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 multi unit session when some packages have reexported modules. #3928

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

wz1000
Copy link
Collaborator

@wz1000 wz1000 commented Jan 5, 2024

If we are loading multiple home packages, we need to explicitly take reexports
into account when searching for target files.

If we can't find a module via the usual mean, but it is listed as a reexport of
a unit in scope, we need to look for the module from the perspective of that unit.

This is not necessary for non-home modules because GHC already handles this for
modules in the package DB.

Unfortunately we can't fix this in GHC 9.2 because it doesn't support multiple
home units and we have no way of knowing if a unit reexports modules

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

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

LGTM, one comment needed.

@wz1000 wz1000 added the merge me Label to trigger pull request merge label Jan 7, 2024
@wz1000 wz1000 requested a review from michaelpj as a code owner January 9, 2024 11:15
@fendor fendor enabled auto-merge January 9, 2024 11:34
If we are loading multiple home packages, we need to explicitly take reexports
into account when searching for target files.

If we can't find a module via the usual mean, but it is listed as a reexport of
a unit in scope, we need to look for the module from the perspective of that unit.

This is not necessary for non-home modules because GHC already handles this for
modules in the package DB.

Unfortunately we can't fix this in GHC 9.2 because it doesn't support multiple
home units and we have no way of knowing if a unit reexports modules
@fendor fendor merged commit b316b47 into master Jan 9, 2024
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants