Skip to content

stack init should use a user configurable snapshot setting as a default #1590

Closed
@harendra-kumar

Description

@harendra-kumar

Currently stack init picks up the most recent LTS and nightly from the snapshots dir and then the downloaded ones. I propose that, by default, instead of selecting a snapshot via an automatic and opaque selection process, init should prefer a user configured snapshot.

This gives the user an explicit control over the set of packages/compiler being used by default. We could have a --auto flag which can be used for auto fallback (the current default). The user will have to explicitly choose the auto option. We will also suggest it as a next step if init fails. We already have the --resolver flag to use a specific snapshot.

This allows the default reuse of a snapshot with the user's explicit knowledge.

The default could be the global project's resolver setting or maybe a setting in config.yaml. We can also provide a CLI command to control the default. It could be stack config default-resolver or something like that.

This should also solve #1374 cleanly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions