-
Notifications
You must be signed in to change notification settings - Fork 725
Open
Labels
Description
Describe the bug
When calling cabal build on a project with:
- a dependency
some-libwith malformatted haddock comments - a
cabal.projectthat asks for documentation to be built for all packages
the command fails pretty unclearly with a "Warning" and zero exit code.
To Reproduce
(I had a pretty messy concrete example, this is breaking it down to what
I believe is a minimal case, but I haven't actually verified this live.)
$ cd /src/some-lib
$ cabal v2-haddock
...
cabal: Failed to build documentation for some-lib-0.1
$ cd /src/main-proj
$ cat cabal.project.local
package *
documentation: true
$ cabal v2-build
In order, the following will be built (use -v for more details):
- some-lib-0.1 (lib:some-lib) (requires build)
- main-proj-0.1 (lib) (first run)
Starting some-lib-0.1 (all, legacy fallback)
Building some-lib-0.1 (all, legacy fallback)
Haddock some-lib-0.1 (all, legacy fallback)
Warning: Failed to build documentation for some-lib-0.1 (which is required by main-proj-0.1).
$ echo $?
0
Expected behavior
cabal build should fail explicitly with an error. I.e., output Error: instead of Warning: , and exit with a non-zero code.
System information
- Operating system: macos
- cabal version 3.4.0.0
- ghc 8.10.2
Reactions are currently unavailable