You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When configuring, building, and installing a package component, instead of the whole package, Cabal will generate a datadir value in the Paths_* module that does not match the actual installation datadir. Potentially leading to file not found errors at runtime of the install package component.
To Reproduce
Fetch and unpack the alex source distribution
$ curl -L http://hackage.haskell.org/package/alex-3.2.4/alex-3.2.4.tar.gz | tar xz
$ cd alex-3.2.4
$ runghc Setup.hs --version
Cabal library version 2.4.0.1
Additional context
This issue can be worked around by setting the --datasubdir= flag, which overrides the default subdirectory under --datadir and does not depend on the component.
This is a huge problem for reanimate as well. The bug can be seen by creating a package with a data file and exposing the generated Paths module. Running cabal v2-exec -- ghc -e Paths_{package}.getDataDir will return the wrong path.
Activity
lemmih commentedon Aug 25, 2020
This is a huge problem for
reanimateas well. The bug can be seen by creating a package with a data file and exposing the generated Paths module. Runningcabal v2-exec -- ghc -e Paths_{package}.getDataDirwill return the wrong path.