haddock生成文档,但返回退出代码1

时间:2018-09-13 03:18:17

标签: haskell haskell-stack haddock

我尝试使用以下命令通过堆栈调用haddock

stack haddock --no-haddock-deps --haddock-internal webservice:lib

stack haddock --haddock-arguments "--odir=/tmp/haddock" --no-haddock-deps --haddock-internal webservice:lib

stack haddock --haddock-arguments "--odir=/tmp/haddock --no-warnings" --no-haddock-deps --haddock-internal webservice:lib

stack haddock --haddock-arguments "--odir=/tmp/haddock --no-warnings --no-print-missing-docs" --no-haddock-deps --haddock-internal webservice:lib

每次,在haddock输出结束时,我都会注意到以下内容:

Documentation created:
.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/doc/html/webservice/index.html,
Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3: can't find source for QCTest in
.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/doc/html/webservice/webservice.txt
.stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/webservice-test/webservice-test-tmp,
Preprocessing test suite 'webservice-test' for webservice-0.1.0.0..
test, src


--  While building custom Setup.hs for package webservice-0.1.0.0 using:
      /home/vl/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1 haddock --html --hoogle --html-location=../$pkg-$version/ --haddock-option=--hyperlinked-source --internal --haddock-option=--odir=/tmp/haddock --haddock-option=--no-warnings --haddock-option=--no-print-missing-docs --haddock-option=--hoogle --haddock-option=--quickjump
    Process exited with code: ExitFailure 1

webservice:lib的文档似乎已经生成,但是haddock仍然以1退出,从而完全破坏了我的CI脚本。

编辑-调试输出:

命令:

stack haddock --haddock-arguments "--odir=/tmp/haddock -v3 --no-haddock-hyperlink-source" --no-haddock-deps --haddock-internal webservice:lib

输出:

Warning: Unable to find a known
         candidate for the Cabal entry
         Keys, but did find: 
         * Keys.hs.sample If you are
         using a custom preprocessor for
         this module with its own file
         extension, consider adding the
         file(s) to your .cabal under
         extra-source-files.
webservice-0.1.0.0: build (lib)
Preprocessing library for webservice-0.1.0.0..
Building library for webservice-0.1.0.0..
ignoring (possibly broken) abi-depends field for packages
webservice-0.1.0.0: haddock
Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3:
'/home/vl/.stack/programs/x86_64-linux/ghc-8.4.3/bin/haddock' exited with an
error:


--  While building custom Setup.hs for package webservice-0.1.0.0 using:
      /home/vl/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1 haddock --html --hoogle --html-location=../$pkg-$version/ --haddock-option=--hyperlinked-source --internal --haddock-option=--odir=/tmp/haddock --haddock-option=-v3 --haddock-option=--no-haddock-hyperlink-source
    Process exited with code: ExitFailure 1

0 个答案:

没有答案