rules_haskell
rules_haskell copied to clipboard
haskell_doctest is failing when there are more than one targets in `deps`.
To reproduce
Inside the rules_haskell
repository, bazel build //tests/haskell_doctest_multiple_deps:both_doctest
fails for me with:
Traceback (most recent call last):
File "/home/stan/tools/rules_haskell/haskell/doctest.bzl", line 180, column 44, in _haskell_doctest_impl
logs.append(_haskell_doctest_single(dep, ctx))
File "/home/stan/tools/rules_haskell/haskell/doctest.bzl", line 137, column 42, in _haskell_doctest_single
depset(get_ghci_library_files(hs, cc_libraries_info, cc.transitive_libraries)),
File "/home/stan/tools/rules_haskell/haskell/private/cc_libraries.bzl", line 57, column 50, in get_ghci_library_files
static_libs, dynamic_libs = get_library_files(
File "/home/stan/tools/rules_haskell/haskell/private/cc_libraries.bzl", line 103, column 54, in get_library_files
cc_library_info = cc_libraries_info.libraries[cc_library_key(lib_to_link)]
Error: key struct(dynamic_library = "bazel-out/k8-fastbuild/bin/_solib_k8/libHStestsZShaskellZUdoctestZUmultipleZUdepsZSbaz-ghc8.10.7.so", interface_library = None, pic_static_library = None, static_library = "bazel-out/k8-fastbuild/bin/tests/haskell_doctest_multiple_deps/libHStestsZShaskellZUdoctestZUmultipleZUdepsZSbaz.a") not found in dictionary
Environment
- OS name + version: NixOS inside
rules_haskell
's nix shell. - Bazel version: 4.2.1
- Version of the rules: https://github.com/tweag/rules_haskell/commit/dfd0161264b3e1ca8e47c30ef258d50e754570fc
Thanks for the repro! It looks like haskell_cc_libraries_aspect
is missing or not forwarded correctly somewhere in this.