Skip to content

fix(Cabal): Fix install-includes with a local (relative) path - #12257

Closed
zlonast wants to merge 3 commits into
haskell:masterfrom
zlonast:zlonast/install-includes
Closed

fix(Cabal): Fix install-includes with a local (relative) path#12257
zlonast wants to merge 3 commits into
haskell:masterfrom
zlonast:zlonast/install-includes

Conversation

@zlonast

@zlonast zlonast commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

fix: #11186


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

@zlonast zlonast changed the title Fix install-includes with a local (relative) path fix(Cabal): Fix install-includes with a local (relative) path Aug 23, 2026
@zlonast zlonast added attention: needs-review re: project root Concerning what cabal considers the root of the project labels Aug 23, 2026
@zlonast

zlonast commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

@sheaf Hi, can you point me in the right direction to solve this problem?

@sheaf

sheaf commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

I think packageRoot is terrible and I should have removed it in my working directory patch. I'm working on a patch which I'll put up soon.

@sheaf

sheaf commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Here's a small patch that removes packageRoot entirely, which was the root cause of the bugs here: sheaf@673e020

On top of that patch, the fix here should be to remove the buildPref argument to installIncludeFiles entirely, changing findInc to have a type signature like findInc :: [SymbolicPath Pkg (Dir Include)] -> RelativePath Include File -> IO (RelativePath Include File, SymbolicPath Pkg File) instead of findInc :: [FilePath] -> FilePath -> IO (FilePath, FilePath). Everything else should be driven by the types and by using i = interpretSymbolicPathLBI lbi like elsewhere.

@zlonast

zlonast commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

@sheaf In that case, I think I'll close my PR in favor of your patch. Please cherry-pick my test into your branch.

@zlonast zlonast closed this Sep 1, 2026
@sheaf

sheaf commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

@sheaf In that case, I think I'll close my PR in favor of your patch. Please cherry-pick my test into your branch.

Understood, thanks for your work. I have put up #12310.

@zlonast
zlonast deleted the zlonast/install-includes branch September 1, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

attention: needs-review re: project root Concerning what cabal considers the root of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install-includes not working as expected

2 participants