Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MangoIV opened this issue Nov 5, 2022 · 3 comments
Assignees
Labels
bug Something isn't working preserved Keep stale bot away

Comments

@MangoIV
Copy link
Contributor

MangoIV commented Nov 5, 2022

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.

@MangoIV MangoIV added the bug Something isn't working label Nov 5, 2022
@MangoIV MangoIV changed the title Executables are not uses in build-tool-depends if the library is obtained via haskell.nix Executables are not used in build-tool-depends if the library is obtained via haskell.nix Nov 5, 2022
@ParetoOptimalDev
Copy link

Allso see #839

@stale
Copy link

stale bot commented Jun 10, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 10, 2023
@andreabedini andreabedini self-assigned this Jun 12, 2023
@andreabedini andreabedini added the preserved Keep stale bot away label Jun 12, 2023
@ScottFreeCode
Copy link

There are some other issues that might have the same underlying cause, here: https://gist.github.com/ScottFreeCode/ef9f254e2dd91544bba4a068852fc81f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preserved Keep stale bot away
Projects
None yet
Development

No branches or pull requests

4 participants