我正在遵循GettingStarted指南,当我运行“cabal test”并收到此消息时:
Deprecated: "Please use the new testing interface instead!"
什么是新的测试界面?
我正在遵循GettingStarted指南,当我运行“cabal test”并收到此消息时:
Deprecated: "Please use the new testing interface instead!"
什么是新的测试界面?
这个消息实际上是来自 cabal,而不是 darcs,并且是指 cabal 测试接口。
大多数 Haskell 项目都包含一个文件Setup.hs
或Setup.lhs
cabal 运行以构建项目。通常只调用 default 就足够了Distribution.Simple.defaultMain
,但是cabal 库中的UserHooks定义了许多挂钩来扩展 cabal 的默认行为。其中一个钩子是runTests
,这曾经是告诉 Cabal 关于包的测试套件的唯一方法。然而runTests
,现在不推荐使用 cabal 包文件的测试套件部分。darcs 的Setup.lhs
文件覆盖了runTests
钩子,这会触发弃用警告。
作为 darcs 用户,您无需担心此消息。如果你有兴趣为 darcs 项目做贡献,修复这个问题应该相对简单,我相信补丁会被欣然接受。