Skip to content

build-tool-depends with custom setup tries to build the wrong component #6011

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

Open
lukel97 opened this issue Apr 23, 2019 · 1 comment
Open

Comments

@lukel97
Copy link
Contributor

lukel97 commented Apr 23, 2019

  • The test case contains a sub-package foo that exposes an executable called bar
  • The parent package has a build-tool-depends on foo:bar
  • foo also has build-type: Custom
  • During cabal new-build, cabal tries to build exe:foo when it should build exe:bar

cabal-subexe-bug.tar.gz

Occurs on both 2.4.1.0 and HEAD at the time of writing

$ cabal new-build
Resolving dependencies...
Build profile: -w ghc-8.6.4 -O1
In order, the following will be built (use -v for more details):
 - foo-0.1.0.0 (lib:foo, exe:foo) (configuration changed)
 - cabal-subexe-bug-0.1.0.0 (lib) (configuration changed)
 - cabal-subexe-bug-0.1.0.0 (lib) (configuration changed)
Configuring foo-0.1.0.0...
setup: Unknown build target 'exe:foo'.
There is no executable component 'foo' or component 'exe'.

cabal: Failed to build foo-0.1.0.0 (which is required by
cabal-subexe-bug-0.1.0.0).
@23Skidoo
Copy link
Member

Thanks for providing a repro case!

ulrikdem added a commit to ulrikdem/quipper that referenced this issue Jul 5, 2023
Alternatively, quipper-cabal could add quipper-pp to build-tool-depends,
but this currently does not work due to a Cabal bug
(haskell/cabal#6011).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants