Skip to content

Executables are not used in build-tool-depends if the library is obtained via haskell.nix #1770

Open
@MangoIV

Description

@MangoIV

Describe the bug

When trying to use
build-tool-depends: markdown-unlit:markdown-unlit

I get

plutarch-docs:markdown-unlit:exe.markdown-unlit-0.5.1/installed-4CgIbMeCiwSElzbwyyhikO
(does not contain executable 'markdown-unlit', which is required by my-library *test)

Which is wrong.

  • Build system: x86_64-linux
  • GHC version: 924
  • Haskell.nix version: 5eccdb523

Steps To Reproduce

add the following to your cabal file:

  ghc-options: -pgmL markdown-unlit

  build-depends:
    , base
    , markdown-unlit

  build-tool-depends: markdown-unlit:markdown-unlit

Expected behavior

cabal manages to resolve the executable

Additional context

This is probably related to another issue I opened, #1662. Also related:
haskell/cabal#8481
IntersectMBO/cardano-node#4455
#839

This doesn't happen in the testcases in haskell.nix (like test/shell-for) because the dependencies are not resolved via haskell.nix but locally via cabal.

This is a huge issue causing all sorts of ugly hacks in practice.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpreservedKeep stale bot away

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions