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

@wz1000 wz1000 requested a review from pepeiborra as a code owner January 5, 2024 10:28
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 force-pushed the wip/multi-reexport branch from bec3970 to 55d2e5f Compare January 5, 2024 12:12
@wz1000 wz1000 added the merge me Label to trigger pull request merge label Jan 7, 2024
@wz1000 wz1000 force-pushed the wip/multi-reexport branch from ddf9ee3 to 1c05357 Compare January 8, 2024 08:48
@wz1000 wz1000 requested a review from michaelpj as a code owner January 9, 2024 11:15
@wz1000 wz1000 force-pushed the wip/multi-reexport branch from ac0f797 to c6e27ca Compare January 9, 2024 11:25
@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
@wz1000 wz1000 force-pushed the wip/multi-reexport branch from 03c83f4 to 9a7b0d2 Compare January 9, 2024 11:36
@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