-
Notifications
You must be signed in to change notification settings - Fork 704
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
For ghc calls pass Cabal's build/ directory after user's src/ directory so that contents of src/ takes precedence #8690
Conversation
18216ef
to
46b2d42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you. Please kindly set the merge (squash?) label.
The GHA failure is hacked around; let me rebase to fix CI. |
mergify rebase |
@mergify rebase |
To get the future behavior now, you can configure Or you can create a dedicated github account for squash and rebase operations, and use it in different |
✅ Branch has been successfully rebased |
@mergify regresh |
❌ Sorry but I didn't understand the command. Please consult the commands documentation 📚. |
@mergify refresh |
✅ Pull request refreshed |
silly computer |
@mergify rebase |
To get the future behavior now, you can configure Or you can create a dedicated github account for squash and rebase operations, and use it in different |
✅ Branch has been successfully rebased |
@mergify rebase |
To get the future behavior now, you can configure Or you can create a dedicated github account for squash and rebase operations, and use it in different |
✅ Branch has been successfully rebased |
@sergv: something locked on hard in CI for this PR. Could you kindly rebase manually? Then we'd run CI and I'd force-merge if needed. |
To get the future behavior now, you can configure Or you can create a dedicated github account for squash and rebase operations, and use it in different |
✅ Branch has been successfully rebased |
@mergify requeue |
☑️ This pull request is already queued |
@mergify unqueue |
☑️ The pull request is not queued |
@mergify requeue |
☑️ This pull request is already queued |
doh |
@mergify rebase |
…ride any files we autogenerated
…will have Cabal updated
Otherwise output will not be correct. It’s tricky to pass proper Cabal/ version to this test because it needs it for the custom setup.
To get the future behavior now, you can configure Or you can create a dedicated github account for squash and rebase operations, and use it in different |
✅ Branch has been successfully rebased |
f6fd7af
to
fd4f7bf
Compare
OK, mergify seems to have unclogged |
Phew, finally. @sergv: thank you again! |
A fix for #8689.
The fix is a one line change that changes order of directories where searches will be searched by the ghc. Cabal's internal build/ directory (e.g.
dist-newstyle/build/x86_64-linux/ghc-9.4.4/Cabal-3.9.0.0/build/
) now is passed after all source directories specified by the package in order to make sure that if there's a user-supplied file that corresponds to a particular module thet it will never be overshadowed by what's in the cabal's internal build/ directory. Autogenerated modules get written into the internal build/ directory so they have a real chance of shadowing one of user's modules as shown in the linked issue.Testsing methodology
I built GHC with Cabal that has this patch and run the test. It's tricky to run the added test because it relies on custom setup which can only access Cabal package bundled with GHC.
Custom setup is needed because autogenerated modules with a custom preprocessor (in this case identity preprocessor) are used.
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!