Open phadej opened 5 years ago
+1. The basic issue here is that if you say install --only-dependencies foo bar
and bar
is a dependency of foo
, it will currently fail. There may be an existing ticket for the v1
case.
I just ran into this problem with a backpack project. +1 on making it build store (remote) packages
Given that, if you go on a flight, v2-build --only-dependencies will prepare you for an offline hacking session
this should be fixed by the new --only-download
Confirming, ran into the same issue with a Backpack project:
Resolving dependencies...
cabal-3.6.2.0: Cannot select only the dependencies (as requested by the '--only-dependencies' flag), the packages xinu-0.1.0.0 and xinu-ffi-0.1.0.0 are required by a dependency of one of the other targets.
This is quite unexpected since neither of those packages can be a dependency of anything else (one is, however, a dependency of the other, and on has internal libraries, but I don't expect that to be an influence with --only-dependencies
).
Would it help to have a (trivial) reproducer repo?
Reproducers are always welcome. But could you try with cabal 3.8.1 first? Just in case.
On 3.10 this blocks me in presence of git dependencies.
Solver should pick as much as it can, there are dependencies to be built, even there are so called in-place packages (here:
tutorial
depends onservant-js
which depends onservant-js
)More concretely, given there are four categories of packages in a plan
I'd need a flag to build all packages which will end in the nix-store (which IMO we should rename to v2-build store: https://github.com/haskell/cabal/issues/6105, because nix-store is
/nix/store
). I think that--only-dependencies
is close to that. To make more people happy, thev2-build --only-dependencies
could also download inplace packages.Given that, if you go on a flight,
v2-build --only-dependencies
will prepare you for an offline hacking session.