hash-org / hashc

The Hash programming language compiler :zap:
https://hash-org.github.io/hashc/
MIT License
25 stars 2 forks source link

Fix import resolution logic #1065

Closed feds01 closed 3 months ago

feds01 commented 5 months ago

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