Skip to content

Running stack config set resolver X inside a project modifies the global project's stack.yaml #2709

@sjakobi

Description

@sjakobi
~/tmp $ stack new repro
...
~/tmp $ cd repro/
~/t/repro $ stack config set resolver nightly
Selected resolver: nightly-2016-10-13
/home/simon/.stack/global-project/stack.yaml has been updated.

This bug probably crept in during 0bdab6e.

I think I missed that the Config that I get from withMiniConfigAndLock doesn't contain any information on the current project, so getStackYaml always ends up looking for the global project.

I probably won't get around to fixing this until Sunday…

I also think that it would be good to have safeguards against bugs like this, for example by assigning different types to Configs from MiniConfigs and BuildConfigs or something similar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions