[FIX] Allow imports with module names to work#398
Open
NotHyper-474 wants to merge 1 commit intoFunkinCrew:experimentalfrom
Open
[FIX] Allow imports with module names to work#398NotHyper-474 wants to merge 1 commit intoFunkinCrew:experimentalfrom
NotHyper-474 wants to merge 1 commit intoFunkinCrew:experimentalfrom
Conversation
941c55d to
b16de99
Compare
EliteMasterEric
requested changes
Apr 30, 2026
Member
EliteMasterEric
left a comment
There was a problem hiding this comment.
I happened to have import haxe.Unserializer; in a script where I was testing blacklist stuff.
Before this PR, it silently fails to import, then throws an error when you try to access the blacklisted module when you call a function that uses the import.
After this PR, it throws an error when trying to import (one that doesn't mention the fact the module is blacklisted).
Either revert to the previous behavior (script error thrown when calling the blacklisted class) or add an error when attempting to import the blacklisted class.
b16de99 to
b49f76a
Compare
Collaborator
Author
|
Fixed by reverting to the previous behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes it so doing imports like
foo.bar.Waldo.Fredwork instead of having to write it asfoo.bar.Fred. The fix is such a no-brainer which surprises me someone hasn't tried to do it yet.Note that this technically makes it so putting anything as the module will work, but I don't think there's a way to validate that (we have enough macros already) and I don't think it's really worth it since this PR just makes it more convenient to use hscript with auto-completion.
The scary diff is from me trying to avoid boilerplate code.