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

cabal new-build [all] fails to honour --dependency-only #3857

Open
hvr opened this issue Sep 18, 2016 · 0 comments
Open

cabal new-build [all] fails to honour --dependency-only #3857

hvr opened this issue Sep 18, 2016 · 0 comments

Comments

@hvr
Copy link
Member

hvr commented Sep 18, 2016

#3815 implemented --dependency-only handling, but didn't yet properly handle the implicit build-all cabal new-build --dep case as was pointed out in #3815 (comment) (relevant part quoted below).

This can be workarounded for now by using --dependency-only with explicitly named targets rather than the implicit "all" target.


@dcoutts This seems to work nice, except for the cabal new-build case when using a cabal.project file (and no .cabal file in the top-level folder & with CWD=top-level-folder) and thus causing it to implicitly build all packages: in this case cabal new-build --deps seems to consider nothing to be a dependency goal, e.g.

$ cd /tmp/foo
$ cabal get uhttpc-0.1.1.0
Unpacking to uhttpc-0.1.1.0/
$ echo "packages: uhttpc-0.1.1.0"  > cabal.project
$ cabal new-build --dry
Resolving dependencies...
In order, the following would be built (use -v for more details):
 - bytestring-lexing-0.5.0.2 (lib:bytestring-lexing, lib:bytestring-lexing) (requires build)
 - uhttpc-0.1.1.0 (lib) (first run)
 - uhttpc-0.1.1.0 (exe:uhttpc-bench) (first run)
$ cabal new-build --dep
Up to date
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

1 participant