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
Next, the problem is that the happy-lib component is basically empty (ie. it does not produce a static nor shared library and no haddock) since it just re-exports modules from sub-libraries.
Furthermore, the backend sublibraries depend on the Paths_happy_lib module (see here) to locate its data-dir which fails at runtime since the location of the data-dir in the runfiles tree is completely different to what the Cabal generated (relocatable) Paths modules expects:
happy: /home/claudio/.cache/bazel/_bazel_claudio/f3d395587a4c32cd78e0bbc3318c2a29/execroot/rules_haskell_tests/bazel-out/k8-opt-exec-C7777A24/bin/external/stackage/happy-2.0.2/_install/happy-lib-2.0.2-backend-lalr_data/HappyTemplate.hs: openFile: does not exist (No such file or directory)
We would need to pass generate_paths_module = True to the haskell_cabal_libary stanzas generated by stack_snapshot. But that would also require patching the .cabal file to disable auto-generation of the Paths modules and add the runfiles library as a dependency. Probably the best option would be to vendor the sources in this case.
To Reproduce
Use stack_snapshot with happy >= 2 and try to run it as a tool.
Expected behavior
We should be able to build happy (and happy-lib).
Environment
OS name + version: linux / nixOS
Bazel version: 6.5.0
Version of the rules: 1.0.0
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
After updating the stackage snapshot to 2024-10-10, we get happy version 2.0.2 from hackage.
This version is no longer a simple executable but the package has been split into the command line tool and a library with multiple sublibraries.
First off, this means we have to declare dependencies between components of the library manually:
Next, the problem is that the happy-lib component is basically empty (ie. it does not produce a static nor shared library and no haddock) since it just re-exports modules from sub-libraries.
Furthermore, the backend sublibraries depend on the
Paths_happy_lib
module (see here) to locate its data-dir which fails at runtime since the location of the data-dir in the runfiles tree is completely different to what the Cabal generated (relocatable) Paths modules expects:We would need to pass
generate_paths_module = True
to thehaskell_cabal_libary
stanzas generated bystack_snapshot
. But that would also require patching the .cabal file to disable auto-generation of the Paths modules and add the runfiles library as a dependency. Probably the best option would be to vendor the sources in this case.To Reproduce
Use stack_snapshot with happy >= 2 and try to run it as a tool.
Expected behavior
We should be able to build happy (and happy-lib).
Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: