Stack 尚未使用 GHC 和 Cabal 版本进行测试

Stack has not been tested with GHC & Cabal versions

在我的 Haskell 项目中,当我 stack run 时,它显示以下内容,但仍在运行。这是什么警告?我怎样才能摆脱它?

Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version 3.0.1.0 was found, this may fail

这只是一个兼容性警告。下一个堆栈版本应该使用 GHC 8.8 进行测试,并且此警告应该消失。在那之前,除非您想修改源代码,否则您可能无能为力。

正如其他人所说,这很可能会被忽略。如果您想超级安全,请编辑 stack.yaml 并将解析器降级回 14.x(此时最新版本是 14.27)。

您可以在创建项目时指定解析器以消除此警告:

stack new hello-world simple --resolver=lts-14.27