Cabal沙箱测试hackage包需要我没有的版本的基础(Cabal sandboxes to test a package on hackage requiring a version of base I don't have)

我正在读这个:

http://devskypers.blogspot.fr/2014/02/logging-flow-activity.html

并且想要尝试。

一个简单的cabal install monad-journal告诉我,我有基础4.6.0.1但是monad-journal需要4.5。*。

我希望沙箱可以提供帮助,但是沙箱似乎只适用于我自己的包装,即便如此,我也不太明白它是如何管理的。 我尝试为空包创建一个简单的cabal文件并获取注释:

Note: when using a sandbox, all packages are required to have consistent dependencies. Try reinstalling/unregistering the offending packages or recreating the sandbox.

是否有任何简单的方法可以说“在我的本地沙箱中安装此软件包及其所有依赖项,以便我可以使用它,忽略我可能在全球安装的任何其他内容”? 我按照这里的建议尝试了--shadow-installed-packages,但是我得到了同样的错误。

I was reading this:

http://devskypers.blogspot.fr/2014/02/logging-flow-activity.html

And wanting to try.

A simple cabal install monad-journal tells me that I have base 4.6.0.1 but monad-journal requires 4.5.*.

I was hoping a sandbox could help, but sandboxes seem only to be for my own packages, and even then I don't really understand how it manages things. I tried making a simple cabal file for an empty package and get the note:

Note: when using a sandbox, all packages are required to have consistent dependencies. Try reinstalling/unregistering the offending packages or recreating the sandbox.

Is there any simple way to say "Install this package, and any dependencies it has, in my local sandbox so I can play around with it, ignoring whatever else I might have globally installed"? I tried --shadow-installed-packages as suggested here, but I get the same error.

最满意答案

base (以及其他几个软件包)的问题在于它们与您拥有的GHC版本相关联。 您不能简单地安装不同版本的base ,无论是否有沙箱。

cabal HEAD有一个标志 - --allow-newer ,在这种情况下应该有所帮助。 或者只是monad-journal的维护者来放松版本界限。

The trouble with base (and a couple of other packages) is that they are tied to the GHC version you have. You can't simply install a different version of base, with or without sandboxes.

cabal HEAD has a flag --allow-newer which should help in this case. Or just bug the maintainer of monad-journal to relax version bounds.

更多推荐