Skip to content

Cabal build-tool-depends doesn't work #5560

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

Closed
domenkozar opened this issue Sep 3, 2018 · 4 comments
Closed

Cabal build-tool-depends doesn't work #5560

domenkozar opened this issue Sep 3, 2018 · 4 comments

Comments

@domenkozar
Copy link
Collaborator

See the following diff: https://github.com/sol/markdown-unlit/pull/13/files

Which results into:

$ cd example && cabal install --only-dependencies --enable-tests && cabal configure --enable-tests && cabal build && cabal test
Resolving dependencies...
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.
Resolving dependencies...
Configuring nifty-library-0.0.0...
Preprocessing test suite 'readme' for nifty-library-0.0.0..
Building test suite 'readme' for nifty-library-0.0.0..
ghc: could not execute: markdown-unlit

I thought maybe there was a bug in Cabal 2.0, but it also fails with 2.2: https://travis-ci.org/nikita-volkov/hasql/jobs/423628586

@hvr
Copy link
Member

hvr commented Sep 3, 2018

Due to technical limitations of old-build, build-tool-depends only fully works w/ the nix-style new-* commands; see also documentation (https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-build-tool-depends) which points out this gotcha:

Cabal can make sure that specified programs are built and on the PATH before building the component in question. It will always do so for internal dependencies, and also do so for external dependencies when using Nix-style local builds.

Do we need to make the documentation clearer?

@domenkozar
Copy link
Collaborator Author

Thanks @hvr :)

It is fine for the package to be the current one, in which case this is termed an internal, rather than external executable dependency.

I don't understand this sentence, what does it mean to be "current one"?

@domenkozar
Copy link
Collaborator Author

Ah, does it mean any target defined in current cabal file?

@domenkozar
Copy link
Collaborator Author

#5561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants