New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"stack new --bare" will overwrite files #1597

Closed
mgsloan opened this Issue Jan 3, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@mgsloan
Collaborator

mgsloan commented Jan 3, 2016

It seems like somewhere along the line, the intention of 9b2c441 was lost (to have stack new --force indicate that overwriting files is ok). Maybe --bare without --force should require that the current directory is empty?

mgsloan referenced this issue in harendra-kumar/stack Jan 3, 2016

Allow solver to be used with any resolver
Currently stack init --solver cannot be used with a specific resolver.
It just uses the GHC on your path and provides a compiler resolver
corresponding to that GHC and all deps are extra deps.

Instead, we want to be able to use a specific snapshot and only deps not
matching the snapshot should be extra deps. This commit is a step towards
that goal.

1) '--solver' is now a switch which can be used along with a resolver.
    'stack init --resolver lts-2.22 --solver' will now be a valid init
    command.

2)  Snapshot selector now returns the snapshot with least number of
    dependency errors as a partial match. This snapshot is to be used
    by the solver.

    Note that the solver is not yet changed to work on an existing
    snapshot. That will come in a future commit.

3)  We now report an explicit error when the specified resolver does not
    have a compiler compatible with the package dependencies.

4)  Note a behavior change for the 'stack init --resolver' command. Earlier it
    used to write the stack.yaml file even if it did not successully resolve all
    packages. Now it will fail in that case and suggest '--solver' to
    resolve the extra dependencies.

5)  Separate the snapshot selection interface from the snapshot
    dependency check interface.

6) Some error message reporting changes.
@borsboom

This comment has been minimized.

Contributor

borsboom commented Jan 6, 2016

Agreed.

@borsboom borsboom added the type: bug label Jan 6, 2016

@borsboom borsboom added this to the P1: Must milestone Jan 6, 2016

mgsloan added a commit that referenced this issue Feb 18, 2016

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Feb 18, 2016

Fixed!

@mgsloan mgsloan closed this Feb 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment