2015-11-13 10 views
1

我對cabal工作流程不是很有經驗,所以我懷疑我遇到的問題很簡單。但是,我不喜歡解決方案。Cabal包的依賴關係很滿意,但是我無法通過cabal測試找到它們

我在我的陰謀文件以下依賴性:

$ grep tasty ume.cabal 
    build-depends: base >=4.7 && <4.8, HDBC >=2.4 && <2.5, parsec >=3.1 && <3.2, 
filepath >=1.4 && <1.5, 
HDBC-sqlite3 >=2.3 && <2.4, time >=1.5 && <1.6, sqlite >=0.5 && <0.6, 
bytestring >=0.10 && <0.11, unix >=2.7 && <2.8, cryptohash >=0.11 && <0.12, process >=1.2 && <1.3, 
transformers >= 0.4 && < 0.5, text, base16-bytestring, 
utf8-string, tasty >= 0.11 && < 0.12,tasty-hunit >= 0.9 && < 0.10 

好吧,當我嘗試運行測試套件,我得到這個消息:

$ cabal test 
Re-configuring with test suites enabled. If this fails, please run configure 
manually. 
Resolving dependencies... 
Configuring umecore-hs-0.0.1.0... 
cabal: At least the following dependencies are missing: 
tasty ==0.11.*, tasty-hunit ==0.9.* 

然而,當我嘗試安裝丟失的包,我得到這個消息:

$ cabal install tasty tasty-hunit 
Resolving dependencies... 
All the requested packages are already installed: 
tasty-0.11.0.1 
tasty-hunit-0.9.2 
Use --reinstall if you want to reinstall anyway. 

所以,依賴性得到滿足。我怎麼無法使用這些庫?

編輯:

這裏是整個陰謀的文件:

name:    umecore-hs 
version:    0.0.1.0 
synopsis:   An infrastructure for querying phonetic data 
description:   A framwork for takeing transcription files into a database structure, so that phonetically relevant queries may be made on the transcriptions. 
homepage:   https://github.com/dargosch/umecore-hs/wiki 
license:    BSD3 
license-file:  LICENSE 
author:    Fredrik Karlsson 
maintainer:   [email protected] 
-- copyright: 
category:   Database 
build-type:   Simple 
-- extra-source-files: 
cabal-version:  >=1.10 

library 
    exposed-modules:  Phonetic.Database.QueryGenerator, Phonetic.Database.SegmentList, Phonetic.Database.UmeDatabase, Phonetic.Database.UmeQuery, Phonetic.IPA.IPAParser, Phonetic.Database.DataTypes, Phonetic.Database.UmeQueryParser, Phonetic.FileParsers.TextgridParser 
    ghc-options: -W -fno-warn-unused-do-bind -i/Users/frkkan96/Documents/src/umecore-hs/src 
    -- other-modules: 
    -- other-extensions: 
    build-depends:  base >=4.8 && < 4.9, HDBC >=2.4 && <2.5, parsec >=3.1 && <3.2, filepath >=1.4 && <1.5, HDBC-sqlite3 >=2.3 && <2.4, time >=1.5 && <1.6, sqlite >=0.5 && <0.6, bytestring >=0.10 && <0.11, unix >=2.7 && <2.8, cryptohash >=0.11 && <0.12, process >=1.2 && <1.3, transformers >= 0.4 && < 0.5, text >= 1.2 && <= 1.3, base16-bytestring >= 0.1.1 && < 1.1.2, utf8-string >= 1 && < 1.1, directory >=1.2 && <1.3, regex-base >= 0.9 && < 1.0, regex-pcre >= 0.94 && < 0.95, regex-base >= 0.93 && < 0.94 
    hs-source-dirs:  src 
    default-language: Haskell2010 


Executable textgrid_import 
    Main-Is:  textgrid_import.hs 
    Hs-Source-Dirs: src 
-- Other-Modules: Phonetic.FileParsers.TextgridParser 
    default-language: Haskell2010 
    build-depends:  base >=4.8 && <4.9, HDBC >=2.4 && <2.5, parsec >=3.1 && <3.2, filepath >=1.4 && <1.5, HDBC-sqlite3 >=2.3 && <2.4, time >=1.5 && <1.6, sqlite >=0.5 && <0.6, bytestring >=0.10 && <0.11, unix >=2.7 && <2.8, cryptohash >=0.11 && <0.12, process >=1.2 && <1.3, filemanip >=0.3 && < 0.4, directory >=1.2 && <1.3, optparse-applicative >= 0.12 && < 0.13 

Executable umequery 
    Main-Is:  umequery.hs 
    Hs-Source-Dirs: src 
    default-language: Haskell2010 
    build-depends:  base >=4.8 && <4.9, HDBC >=2.4 && <2.5, parsec >=3.1 && <3.2, filepath >=1.4 && <1.5, HDBC-sqlite3 >=2.3 && <2.4, time >=1.5 && <1.6, sqlite >=0.5 && <0.6, bytestring >=0.10 && <0.11, unix >=2.7 && <2.8, cryptohash >=0.11 && <0.12, optparse-applicative >= 0.12 && < 0.13, text >= 1.2 && <= 1.3, base16-bytestring >= 0.1.1 && < 1.1.2, utf8-string >= 1 && < 1.1, transformers >= 0.4 && < 0.5, regex-pcre >= 0.94 && < 0.95, regex-base >= 0.93 && < 0.94 



source-repository head 
    type:  git 
    location: git://github.com/dargosch/umecore-hs.git 

test-suite test 
    default-language: 
    Haskell2010 
    type: 
    exitcode-stdio-1.0 
    hs-source-dirs: 
    src, tests 
    main-is: 
    tests.hs 
    build-depends: base >=4.7 && <4.8, HDBC >=2.4 && <2.5, parsec >=3.1 && <3.2, filepath >=1.4 && <1.5, HDBC-sqlite3 >=2.3 && <2.4, time >=1.5 && <1.6, sqlite >=0.5 && <0.6, bytestring >=0.10 && <0.11, unix >=2.7 && <2.8, cryptohash >=0.11 && <0.12, process >=1.2 && <1.3, transformers >= 0.4 && < 0.5, text, base16-bytestring, utf8-string, tasty >= 0.11 && < 0.12,tasty-hunit >= 0.9 && < 0.10 
+0

你能提供你的cabal文件嗎? – ErikR

+0

當然。查看修改。 –

+0

我想我也注意到了這個問題:當你運行'cabal install --dependencies-only'時,只有在測試中出現的依賴纔會被安裝。 – crockeea

回答

1

運行cabal install --enable-tests --only-dependencies應該安裝測試套件的依賴關係。

+0

我不知道我必須在運行測試之前運行「install」,但它現在可以運行。謝謝! –

相關問題