Skip to content

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

Merged
mergify[bot] merged 2 commits into
haskell:masterfrom
sheaf:package-root
Nov 11, 2026
Merged

mergify[bot] merged 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.

QA notes:

  • cabal install pkg works for a package with absolute path install-includes.
  • The package root is now always an include path when compiling C files. Build a package containing a .c file with -v2 and see that we now include -I<pkg-root> (e.g. by leaving off include-dirs and putting an #include to a .h file at the package root).

@sheaf
sheaf force-pushed the package-root branch 2 times, most recently from 97cf3c9 to c04c9ce Compare September 1, 2026 11:44
@sheaf
sheaf force-pushed the package-root branch 2 times, most recently from 3d35729 to e6d3a65 Compare September 1, 2026 11:47
@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
@ffaf1

ffaf1 commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Manual QA notes have been included.
They are missing.

@Mikolaj Mikolaj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'm only half confident in my review, but I've seen all letters and I'm thankful for all the simplifications, not even taking fixes into account.

sheaf and others added 2 commits November 9, 2026 09:23
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>
@sheaf

sheaf commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Manual QA notes have been included.
They are missing.

I added QA notes.

I'm going to land this now so that I can focus on other PRs I have open.

@sheaf sheaf added ready and waiting Mergify is waiting out the cooldown period and removed attention: needs-review labels Nov 9, 2026
@sheaf sheaf added the merge me Tell Mergify Bot to merge label Nov 9, 2026
@mergify mergify Bot added merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days queued labels Nov 11, 2026
@mergify

mergify Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as 22b6bf9 at 18:59 UTC

3 h 39 min in the queue, 3 h 26 min of it CI.

So far

12 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of · required by GitHub branch protection:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of · required by GitHub branch protection:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of · required by GitHub branch protection:
    • check-success = Validate post job
    • check-neutral = Validate post job
    • check-skipped = Validate post job
  • any of · required by GitHub branch protection:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of · required by GitHub branch protection:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of · required by GitHub branch protection:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of · required by GitHub branch protection:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of · required by GitHub branch protection:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of · required by GitHub branch protection:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs

Times in UTC · dashboard · how the merge queue works

@mergify
mergify Bot merged commit 22b6bf9 into haskell:master Nov 11, 2026
71 checks passed
@mergify mergify Bot removed the queued label Nov 11, 2026
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.

install-includes not working as expected

4 participants