Closed dunric closed 2 months ago
@dunric, thanks for reporting. This is both a limitation of the current feature and a bug.
The limitation is that the config set
commands only handle existing keys of the form key: value ...
(where ...
, if it exists, is assumed to be a comment) on a single line.
The bug is that (a) the parser of a single line was intended to fail (with a warning) if it did not have that form; and (b) the limitation of the feature is not documented online.
I've raised pull requests to fix the bug.
The barrier to a more capable feature is the challenge of modifying the substantive content of a YAML file (read by code) while preserving its form (including comments) (read by people).
General summary/comments (optional)
Updating configuration of resolver with
stack config set
rendersstack.yaml
invalid.Steps to reproduce
stack new myproj
, for examplecd myproj
stack config set resolver nightly
resolver.url
key is updated improperlyExpected
Resolver entry should contain
and
url
subkey should be removed or commented outActual
Attempts to invoke stack commands like build or run fail with
Stack version
Method of installation
Via GHCup
Platform
x86_64 GNU/Linux