Fix lookup of header files in install-includes - #12310
Open
sheaf wants to merge 2 commits into
Open
Conversation
sheaf
force-pushed
the
package-root
branch
2 times, most recently
from
September 1, 2026 11:44
97cf3c9 to
c04c9ce
Compare
6 tasks
Header files named in `includes` and `install-includes` are now looked
up in the same set of directories everywhere, via the new
`Distribution.Simple.BuildPaths.includeSearchDirs`.
This fixes the following issues:
- A header at the package root (without any `include-dirs`) would not
be found when compiling C sources.
- Generated header files for sub-libraries and foreign libraries would
not be found (we looked under the component's build directory rather
than the package's).
- Absolute `include-dirs` entries were silently ignored when locating
`install-includes` files (haskell#11186).
Fixes haskell#11186
Co-Authored-By: Ilya Baryshnikov <zlonast3@gmail.com>
zlonast
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: #11186.
Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
This PR removes the hacky logic for computing the package root in terms of the
--cabal-fileflag (made obsolete by--working-dir), and cleans up the logic for searching include directories with the common functionDistribution.Simple.BuildPaths.includeSearchDirs.