пикша генерирует документы, но возвращает код выхода 1 - PullRequest
0 голосов
/ 13 сентября 2018

Я пытался вызвать 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

И каждый раз, к концу вывода пикши я замечаю следующее:

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
...