如果 cabal 文件更改,为什么 cabal 构建会失败?

发布于 2024-10-13 00:10:20 字数 157 浏览 4 评论 0原文

有人帮助我理解它。 Cabal,很棒的应用程序,喜欢它。但如果 cabal 文件发生更改,cabal 构建将会失败,并显示一条消息,提示运行 cabal 配置。不过,它并没有在阴谋集团安装时抱怨这一点。我不明白为什么 cabal 的程序员不辞辛劳地检测情况并发出消息,而不是自动运行配置步骤。为什么?

Someone help me make sense of it. Cabal, great app, love it. But cabal build will fail if the cabal file has changed, with a message saying run cabal configure. It does not complain about this on cabal install though. I don't understand why programmers of cabal went to all the trouble to detect the situation and put the message out instead of running the configure step automatically. Why?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

愛放△進行李 2024-10-20 00:10:20

我实际上认为这在 cabal-install 0.9.5 和 Cabal 1.10.1.0 中已经改变:

$ cabal unpack bytestring
cd byteDownloading bytestring-0.9.1.9...
    Unpacking to bytestring-0.9.1.9/

$ cd bytestring-0.9.1.9/

$ runghc Setup.hs configure
Configuring bytestring-0.9.1.9...

$ touch bytestring.cabal 

$ runghc Setup.hs build
./bytestring.cabal has been changed. Re-configuring with most recently used
options. If this fails, please run configure manually.
Configuring bytestring-0.9.1.9...
Preprocessing library bytestring-0.9.1.9...
Building bytestring-0.9.1.9...
[1 of 8] Compiling Data.ByteString.Fusion ( Data/ByteString/Fusion.hs, dist/build/Data/ByteString/Fusion.o )
... etc ...

所以只需等待下一个 Haskell Platform 版本(使用 GHC 7 和新的 Cabal),你就不会再遇到这个恼人的错误了:-)

I actually think this has changed in cabal-install 0.9.5 and Cabal 1.10.1.0:

$ cabal unpack bytestring
cd byteDownloading bytestring-0.9.1.9...
    Unpacking to bytestring-0.9.1.9/

$ cd bytestring-0.9.1.9/

$ runghc Setup.hs configure
Configuring bytestring-0.9.1.9...

$ touch bytestring.cabal 

$ runghc Setup.hs build
./bytestring.cabal has been changed. Re-configuring with most recently used
options. If this fails, please run configure manually.
Configuring bytestring-0.9.1.9...
Preprocessing library bytestring-0.9.1.9...
Building bytestring-0.9.1.9...
[1 of 8] Compiling Data.ByteString.Fusion ( Data/ByteString/Fusion.hs, dist/build/Data/ByteString/Fusion.o )
... etc ...

So just wait for the next Haskell Platform release (with GHC 7 and the new Cabal) and you won't get this annoying error again :-)

夢归不見 2024-10-20 00:10:20

我想这是因为这会导致奇怪的错误。假设您配置了一些参数,例如。您选择了另一个编译器 -w。目前,cabal 不知道您为配置提供了哪些参数。我想请求重新配置实际上比使用默认参数进行配置更明智。但为什么不为此开一张票呢?

I guess it's because this would lead to strange errors. Let's assume, you configured with some parameter, eg. you selected another compiler eith -w. Currently, cabal don't knows, what parameters you gave to the configuration. I guess it's actually smarter to request a reconfiguration instead of configuration with the default parameters instead. But why not open a ticket for this?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文