Repository navigation
haskell_cabal_binary: Link data dirs of Cabal library dependencies - #2504
Draft
illia-bobyr wants to merge 1 commit into
Draft
illia-bobyr wants to merge 1 commit into
illia-bobyr wants to merge 1 commit into
Conversation
A library's `Paths_*` module, generated by Cabal in relocatable mode, looks for the library's data files relative to the running executable. As every package is installed into its own `_install` directory, an executable from another package could not find them. For example, `happy` fails to find `HappyTemplate.hs` from `happy-lib`, which breaks any package that uses `happy` as a tool, such as `ghc-lib-parser`. `haskell_cabal_library` now returns `HaskellCabalDataInfo` with the data directories of itself and its Cabal library dependencies. `haskell_cabal_binary` symlinks them into its own `_install` directory, where the `Paths_*` modules look for them. See `_link_library_data_dirs()` for details. Fixes tweag#2274 Assisted-by: Claude
illia-bobyr
force-pushed
the
pr/cabal-binary-library-data-dirs
branch
from
November 23, 2026 09:07
166150d to
03b9377
Compare
This branch has not been deployed
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.
A library's
Paths_*module, generated by Cabal in relocatable mode, looks for the library's data files relative to the running executable. As every package is installed into its own_installdirectory, an executable from another package could not find them. For example,happyfails to findHappyTemplate.hsfromhappy-lib, which breaks any package that useshappyas a tool, such asghc-lib-parser.haskell_cabal_librarynow returnsHaskellCabalDataInfowith the data directories of itself and its Cabal library dependencies.haskell_cabal_binarysymlinks them into its own_installdirectory, where thePaths_*modules look for them. See_link_library_data_dirs()for details.Fixes #2274
Assisted-by: Claude