Skip to content
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

Fix import resolution logic #1065

Merged
merged 4 commits into from
May 30, 2024
Merged

Fix import resolution logic #1065

merged 4 commits into from
May 30, 2024

Conversation

feds01
Copy link
Contributor

@feds01 feds01 commented Apr 23, 2024

This fixes issue #980 and other similar issues where given that multiple imports are being simultaneously parsed, the insertion order of the modules in NodeMap is not correctly preserved when using a Vec. This comes from the fact that the parser generates the corresponding ModuleId. To respect the order of insertion, we use a map between the generated ModuleId and the parsed Modules.

fixes #980
fixes #982

feds01 added 3 commits April 23, 2024 10:44
This fixes issue #980 where given that multiple imports are being
simultaneously parsed, the insertion order of the modules in `NodeMap`
is not correctly preserved when using a `Vec`. This comes from the
fact that the parser generates the corresponding `ModuleId`. Hence,
we respect the order of the insertion by using a map between the
generated `ModuleId` and the parsed `Module`s.
@feds01 feds01 added the bug Something isn't working label Apr 23, 2024
@feds01 feds01 requested a review from kontheocharis April 23, 2024 05:22
@feds01 feds01 self-assigned this Apr 23, 2024
@feds01 feds01 changed the title fix 980 fix #980 Apr 23, 2024
@feds01 feds01 changed the title fix #980 Fix import resolution logic Apr 23, 2024
@feds01 feds01 mentioned this pull request May 21, 2024
@feds01 feds01 merged commit 23a7634 into main May 30, 2024
1 check passed
@feds01 feds01 deleted the fix-980 branch May 30, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compiler stack overflow with imports Module resolution fails to lookup imported symbol
2 participants