Open blackgnezdo opened 3 years ago
I believe cabal-bundler
is doing the right thing here. The problematic dependency chains are:
Now, cabal-bundler seems to correctly omit cmdargs as it is not a transitive dependency of stack. Yet, when I try to build stack
with cabal in network-isolated environment which doesn't have cmdargs, cabal-install
fails:
$ cabal v2-build --offline --disable-benchmarks --disable-tests -j1 --flags="" exe:stack
Warning: No remote package servers have been specified. Usually you would have
one specified in the config file.
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: mustache-2.3.1 (user goal)
[__1] unknown package: cmdargs (dependency of mustache)
[__1] fail (backjumping, conflict set: cmdargs, mustache)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: mustache, cmdargs
I don't know why cabal wants cmdargs to exist, is this a known cabal limitation?
@blackgnezdo cmdargs
is a dependency of an executable in mustache
package. cabal
doesn't have component solving, and solves for all components. See https://github.com/haskell/cabal/issues/4087
I'm :-1: in taking also executables into account, as it will make code a lot more complicated. Rather, we have yet another reason to figure out per component solving
Something is busted in
CabalBundler.OpenBSD
:More specifically, its
bfs
function seems to be to blame. Given this patch:I see that
units
contains cmdargs andusedUnits
does not.@phadej if you happen to spot the bug, I'll happily skip the hunt. Otherwise I'll figure it out.