如果重置 cabal 沙箱不能解决依赖性错误,我该如何调试?

How can I debug if resetting a cabal sandbox does not solve dependency errors?

我有一个奇怪的情况。我有一个曾经正常工作的包,没有明显的原因停止 运行ning cabal test.

$ cabal test
The sandbox was created after the package was already configured.
Re-configuring with most recently used options. If this fails, please run
configure manually.
Resolving dependencies...
Configuring dump-0.2.6...
cabal: The following package dependencies were requested
--dependency='interpolatedstring-perl6=interpolatedstring-perl6-0.9.0-806887e26af0b5e9d9f99d13a2b9d08c'
--dependency='hspec=hspec-2.1.8-4133af4aaac7344a4e3a6a8a90be2cb8'
--dependency='haskell-src-meta=haskell-src-meta-0.6.0.10-044625c00cdf446dac843874b8e39126'
however the given installed package instance does not exist.

我尝试通过 运行ning

重新安装沙箱
cabal sandbox delete
cabal sandbox init
cabal install

这没有帮助。

然后我注意到文字说 The sandbox was created after the package was already configured. 所以我尝试 运行

cabal configure

之后我得到

$ cabal test     
Re-configuring with test suites enabled. If this fails, please run configure
manually.
Resolving dependencies...
Configuring dump-0.2.6...
cabal: At least the following dependencies are missing:
hspec -any

可能出了什么问题?下一步我该怎么做才能尝试对此进行调试?

版本

$ echo {cabal,ghc}" --version;" | sh
cabal-install version 1.22.2.0
using version 1.22.2.0 of the Cabal library 
The Glorious Glasgow Haskell Compilation System, version 7.10.1

要让 cabal install 安装测试的依赖项,您必须使用 --enable-tests 选项。 (对于您安装的大多数软件包,您不打算 运行 测试,然后安装测试的依赖项可能会浪费时间。)根据 post 我中的错误消息猜想您还必须使用 cabal configure --enable-tests 才能使用 cabal test;我不确定这样做的目的是什么。