Skip to content

Fix lookup of header files in install-includes - #12310

Open
sheaf wants to merge 2 commits into
haskell:masterfrom
sheaf:package-root
Open

Fix lookup of header files in install-includes#12310
sheaf wants to merge 2 commits into
haskell:masterfrom
sheaf:package-root

Conversation

@sheaf

@sheaf sheaf commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

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-file flag (made obsolete by --working-dir), and cleans up the logic for searching include directories with the common function Distribution.Simple.BuildPaths.includeSearchDirs.

@sheaf
sheaf requested a review from zlonast September 1, 2026 11:49
@zlonast zlonast linked an issue Sep 1, 2026 that may be closed by this pull request
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install-includes not working as expected

2 participants