我刚刚在Haskell中完成了我的第一个可执行文件+库+测试。
不幸的是,我无法使用cabal sdist
命令创建tar-ball。
cabal install --enable-tests && cabal build && cabal test
正在毫无问题地工作
cabal check
仅返回-O2
>> cabal sdist --verbose
creating dist/src
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0
Distribution quality warnings:
'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit
and not just imposing longer compile times on your users.
Building source dist for UTFTConverter-0.1.0.0...
Preprocessing library UTFTConverter-0.1.0.0...
Preprocessing executable 'UTFTConverter' for UTFTConverter-0.1.0.0...
Preprocessing test suite 'library-tests:' for UTFTConverter-0.1.0.0...
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0/tests
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0
Installing src/Format.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format.hs
Installing src/Format/C.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format/C.hs
Installing src/Format/Converter.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format/Converter.hs
Installing src/Format/Raw.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format/Raw.hs
Installing src/Format/RGB565.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format/RGB565.hs
Installing src/Main.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Main.hs
Installing tests/Tests.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/tests/Tests.hs
Installing LICENSE to dist/src/sdist.-15440/UTFTConverter-0.1.0.0/LICENSE
Installing Setup.lhs to dist/src/sdist.-15440/UTFTConverter-0.1.0.0/Setup.lhs
Installing ./UTFTConverter.cabal to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/./UTFTConverter.cabal
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0
Installing tests to dist/src/sdist.-15440/UTFTConverter-0.1.0.0/tests
cabal: tests: inappropriate type
我的阴谋版
>> cabal -V
cabal-install version 1.18.1.0
using version 1.18.1.3 of the Cabal library
我的GHC版本是
>> ghc -V
The Glorious Glasgow Haskell Compilation System, version 7.8.3
这是项目的github页面,也许有人可以重现这个错误。 >> Link <<
答案 0 :(得分:0)
从tests
部分删除extra-source-files
。你不能把目录放在那个部分。