You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function shows every single single component in elaboratedPlanToExecute. This does not correspond to the list of available targets.
E.g.
✦ ~/code/cabal branchless/09946f1d1fa1217f4480d9ac919e2b264b5a3ecb*
λ $(cabal list-bin cabal) target
...
- uuid-types:lib
- vector-algorithms:lib
- vector-binary-instances:lib
- vector-stream:lib
- vector-th-unbox:lib
- vector:lib
- wherefrom-compat:lib
- witherable:lib
- zinza:lib
- zlib:lib
✦ ~/code/cabal branchless/09946f1d1fa1217f4480d9ac919e2b264b5a3ecb* 10s
λ $(cabal list-bin cabal) build zlib:lib
Warning: this is a debug build of cabal-install with assertions enabled.
Error: [Cabal-7130]
Internal error in target matching: could not make an unambiguous fully qualified target
selector for 'zlib:lib'. We made the target 'zlib:lib' (unknown-component) that was expected
to be unambiguous but matches the following targets:
'zlib:lib', matching:
- zlib:lib (unknown-component)
- :pkg:zlib:lib:zlib:file:lib (unknown-file)
Note: Cabal expects to be able to make a single fully qualified name for a target or provide
a more specific error. Our failure to do so is a bug in cabal.
Tracking issue: https://github.com/haskell/cabal/issues/8684
Hint: this may be caused by trying to build a package that exists in the project directory but
is missing from the 'packages' stanza in your cabal project file.
I added a printPlanTargetForms that would print zlib:lib as if it was a target. With the above command snippet, @andreabedini shows that this is not a target. I did a little more exploration around this and found that while zlib:lib and zlib:lib:zlib are rejected as targets (to the build command for example), the package name by itself is not rejected in the same way.
$ cabal clean
$ cabal build zlib:lib
...
Error: [Cabal-7130] (as above)
...
$ cabal build zlib:lib:zlib
...
Error: [Cabal-7130]
Internal error in target matching: could not make an unambiguous fully qualified target
selector for 'zlib:lib:zlib'. We made the target 'zlib:lib:zlib' (unknown-component) that was
expected to be unambiguous but matches the following targets:
'zlib:lib:zlib', matching:
- zlib:lib:zlib (unknown-component)
- zlib:lib:zlib (unknown-file)
':pkg:zlib:lib:zlib', matching:
- zlib:lib:zlib (unknown-component)
...
$ cabal build zlib
...
Resolving dependencies...
Up to date
We can cabal build all --only-dependencies and this will:
Install only the dependencies necessary to build the given packages.
If it is possible to build only dependencies then is it possible to build only a single dependency? If so, where do I go looking for the build artifacts?
What is cabal actually doing with cabal build zlib? Is zlib a target?
$ cabal build --help
Compile targets within the project.
Usage: cabal build [TARGETS] [FLAGS]
The text was updated successfully, but these errors were encountered:
E.g.
Originally posted by @andreabedini in #9744 (comment)
I added a
printPlanTargetForms
that would printzlib:lib
as if it was a target. With the above command snippet, @andreabedini shows that this is not a target. I did a little more exploration around this and found that whilezlib:lib
andzlib:lib:zlib
are rejected as targets (to the build command for example), the package name by itself is not rejected in the same way.We can
cabal build all --only-dependencies
and this will:If it is possible to build only dependencies then is it possible to build only a single dependency? If so, where do I go looking for the build artifacts?
What is cabal actually doing with
cabal build zlib
? Iszlib
a target?The text was updated successfully, but these errors were encountered: