-
Notifications
You must be signed in to change notification settings - Fork 137
Import and export resolution improvements #2638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Change in memory usage detected by benchmark. Memory Report for 723f6a5
|
I think I found a bug: file A: operation Original() : Unit {} file B: import A.Original as Other; file C: import B.Other; File C will error saying it can't find |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code overall looks good, signing off. Some feedback on from me (and Ian) that could address or discuss, but in general approach seems thorough and the new errors surfaced to the user are great.
Change in memory usage detected by benchmark. Memory Report for 5f1373f
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with minor comment. Thanks!
Fixes
import Bar
from withinnamespace Foo
now correctly resolves toFoo.Bar
, matching the behavior ofopen Bar
Main
namespace (likeexport A as Alias
) are now properly accessible to consuming packagesBreaking changes
Unit
,Qubit
,Int
) removed from legacy APIs - these never actually workedexport Parent
whereParent.Foo
exists) - never properly workedLibrary Cleanup
Implementation Notes
HIR:
namespaces
field from HIR - only resolver needs the namespace treeRes
type instead ofItemId
to preserve even failed export itemsglobal.rs
Parser & AST:
import A.* as B
,export C.*
, and emptyimport;
are now reported in the parser, reducing the validation that the resolver has to doResolver:
resolve()
function encapsulates resolver API complexityLanguage Service:
ImportKind
structure, but no real fixes yet (next PR)