[英]Can I omit or specify a “dummy” value for 'resolver' in my stack.yaml
我使用stack.yaml
与指定相结合的文件--resolver
从而使resolver
在关键stack.yaml
是(或者应该是)总是被忽略。
有没有办法在stack.yaml
本身中指定这个事实? 还是在那里有表达这个习惯的习语。 我只想从文件中省略resolver
,但这是不允许的。
用堆栈以这种方式处理事务并不是惯用的,但是您可以将任何内容放在resolver
字段中,如果提供--resolver
标志,则它将被堆栈忽略。 例如:
$ cat stack.yaml
# stack.yaml
resolver: none
packages: []
extra-deps:
- tardis-0.2.0.0
$ stack repl
Unable to load custom resolver none from local file:
/Users/dan/scratch/stack-no-resolver-test/none
Exception: InvalidYaml (Just (YamlException "Yaml file not found: /Users/dan/scratch/stack-no-resolver-test/none"))
$ stack --resolver lts-12.0 repl
...
Configuring GHCi with the following packages:
GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help
您只需要能够了解针对您的用例的“无法加载自定义解析器无”错误消息,就意味着您忘记了在命令行上提供--resolver
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.