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

Call removeIncludes very early---it is now part of parsing. #1331

Merged
merged 2 commits into from Mar 3, 2022
Merged

Conversation

yav
Copy link
Member

@yav yav commented Mar 2, 2022

We have to do that, so that we can see included imports, and thus load
the correct dependencies for a module.

This fixes #1330

We have to do that, so that we can see included imports, and thus load
the correct dependencies for a module.

This fixes #1330
@yav yav changed the title Call removeIncludes very early---it is not part of parsing. Call removeIncludes very early---it is now part of parsing. Mar 2, 2022
Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. A couple of minor suggestions inline.

Comment on lines -425 to -428
-- remove includes first; we only do this for actual files.
-- it is less clear what should happen for in-memory things, and since
-- this is a more-or-less obsolete feature, we are just not doing
-- ot for now.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be worth migrating this comment to parseModule as well, since it gives the rationale for the InMem case.

case mb of
Right ok -> pure ok
Left err -> noIncludeErrors err
_ -> pure pm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you migrate the comment, it would be better to match on InMem explicitly here to make the connection more obvious.

@yav yav merged commit aeaf61e into master Mar 3, 2022
@RyanGlScott RyanGlScott deleted the T1330 branch March 22, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ModuleSystem panic
2 participants