Skip to content

Take working directory into account in preprocessor hs-boot hack #10991

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sheaf
Copy link
Collaborator

@sheaf sheaf commented Jun 17, 2025

This commit fixes an oversight in runPreProcessorWithHsBootHack, which did not correctly take into account the working directory. This could lead to situations in which we failed to apply the hack.

Recall that this hack is for situations when one has both an hs-boot file and a file in need of preprocessing, such as:

  Foo.y
  Foo.hs-boot

or

  Bar.hsc
  Bar.hs-boot

Failing to apply the hack essentially meant that GHC would not be able to see the hs-boot file, which caused build failures.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

@sheaf sheaf changed the title Take CWD into account in preprocessor hs-boot hack Take working directory into account in preprocessor hs-boot hack Jun 17, 2025
@sheaf sheaf force-pushed the wip/ppHsBootCWD branch from 16b4e2a to 7701072 Compare June 17, 2025 11:34
@sheaf sheaf marked this pull request as ready for review June 17, 2025 11:34
@sheaf sheaf force-pushed the wip/ppHsBootCWD branch from 7701072 to 9e9b99b Compare June 17, 2025 11:35
@sheaf
Copy link
Collaborator Author

sheaf commented Jun 17, 2025

I added a test and changelog entry. This is now ready for review.

@sheaf sheaf force-pushed the wip/ppHsBootCWD branch from 9e9b99b to d94aba7 Compare June 17, 2025 11:38
This commit fixes an oversight in runPreProcessorWithHsBootHack, which
did not correctly take into account the working directory. This could
lead to situations in which we failed to apply the hack.

Recall that this hack is for situations when one has both an hs-boot
file and a file in need of preprocessing, such as:

  Foo.y
  Foo.hs-boot

or

  Bar.hsc
  Bar.hs-boot

Failing to apply the hack essentially meant that GHC would not be able
to see the hs-boot file, which caused build failures.
@sheaf sheaf force-pushed the wip/ppHsBootCWD branch from d94aba7 to 284c8d5 Compare June 18, 2025 09:19
@sheaf sheaf added the merge me Tell Mergify Bot to merge label Jun 18, 2025
@mergify mergify bot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days labels Jun 18, 2025
Copy link
Contributor

mergify bot commented Jun 20, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants