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
I am seeing bazel 7.1.1 and a nixpkgs GHC 9.8.2 produce dynamically linked binaries for haskell_cabal_binary rules, via stack_snapshot. haskell_binary rules still produce statically linked binaries. The bazel dependencies for the dynamically linked binary aren't set up correctly, and will be cleaned up and not replaced when the haskell_cabal_binary target is rebuilt.
To Reproduce https://nas.kylebutt.page/~kyle/bazel-hls-reproduce.tar.xz has a complete reproduction. There are two local_repository rules in the WORKSPACE that have comments indicating the git hashes that are checked out to reproduce the issue.
Expected behavior
rules_haskell should either produce a binary that is statically linked against the haskell dependencies, or it should tell bazel about the dynamic dependencies so that building it causes bazel to populate the library dependencies
Additional context
The build time can likely be reduced by building something with fewer dependencies, like ghcide or hie-bios. They should still show the same static/dynamic linking issue.
I verified that the issue isn't reproducible with bazel 6.5.0. I can work around this bug, but I need the better tree-artifact handling of bazel 7+ for a different issue elsewhere in my repository.
The text was updated successfully, but these errors were encountered:
Describe the bug
I am seeing bazel 7.1.1 and a nixpkgs GHC 9.8.2 produce dynamically linked binaries for
haskell_cabal_binary
rules, viastack_snapshot
.haskell_binary
rules still produce statically linked binaries. The bazel dependencies for the dynamically linked binary aren't set up correctly, and will be cleaned up and not replaced when thehaskell_cabal_binary
target is rebuilt.To Reproduce
https://nas.kylebutt.page/~kyle/bazel-hls-reproduce.tar.xz has a complete reproduction. There are two
local_repository
rules in theWORKSPACE
that have comments indicating the git hashes that are checked out to reproduce the issue.Expected behavior
rules_haskell should either produce a binary that is statically linked against the haskell dependencies, or it should tell bazel about the dynamic dependencies so that building it causes bazel to populate the library dependencies
Environment
Additional context
The build time can likely be reduced by building something with fewer dependencies, like
ghcide
orhie-bios
. They should still show the same static/dynamic linking issue.I verified that the issue isn't reproducible with bazel 6.5.0. I can work around this bug, but I need the better tree-artifact handling of bazel 7+ for a different issue elsewhere in my repository.
The text was updated successfully, but these errors were encountered: