我对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.
因此,满足了依赖关系。为什么我无法使用这些库?
编辑:
以下是整个cabal文件:
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: fredrik.k.karlsson@umu.se
-- 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 :(得分:1)
运行cabal install --enable-tests --only-dependencies
应该安装测试套件的依赖项。