Skip to content
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

Provide --resolver global option #645

Closed
k-bx opened this issue Jul 21, 2015 · 9 comments
Closed

Provide --resolver global option #645

k-bx opened this issue Jul 21, 2015 · 9 comments
Assignees
Milestone

Comments

@k-bx
Copy link
Contributor

k-bx commented Jul 21, 2015

Provide a --resolver=global to overwrite resolver, defined in local stack.yaml with a resolver defined in ~/.stack/global/stack.yaml. This is convenient way to not have to remember which is your global resolver when you want to reuse your global db.

@snoyberg
Copy link
Contributor

OK, give it a shot now on master.

@k-bx
Copy link
Contributor Author

k-bx commented Jul 22, 2015

@snoyberg hmm, doesn't seem to work for me:

➜  stack git:(master) stack --resolver global install
option --resolver: Invalid resolver value: global. Possible valid values include lts-2.12, nightly-YYYY-MM-DD, and ghc-7.10. See https://www.stackage.org/snapshots for a complete list.

Usage: stack [--version] [--help] [--docker*] ([--verbosity VERBOSITY] |
             [-v|--verbose]) ([--system-ghc] | [--no-system-ghc])
             ([--install-ghc] | [--no-install-ghc]) [--arch ARCH] [--os OS]
             [-j|--jobs JOBS] [--extra-include-dirs DIR] [--extra-lib-dirs DIR]
             ([--skip-ghc-check] | [--no-skip-ghc-check]) ([--skip-msys] |
             [--no-skip-msys]) [--local-bin-path DIR] [--resolver RESOLVER]
             [--no-terminal] [--stack-yaml STACK-YAML] COMMAND
➜  stack git:(master) stack --version
Version 0.1.2.1, Git revision ee83f6c95f0e4f059f4e80b8d055deedcfefcb96

@rvion rvion reopened this Jul 22, 2015
@snoyberg snoyberg self-assigned this Jul 22, 2015
@snoyberg
Copy link
Contributor

I'm an idiot, I completely misread the issue as --resolver nightly, which is what I implemented.

Just to clarify how I think you're asking for this to work: this will take the resolver value from the global stack.yaml and reuse it, but then be equivalent to just passing that resolver in via --resolver? The point being: we're only reusing the global snapshot, not the global "locally installed" database, correct?

I'm not certain I understand the use case here, which is probably why I got confused in the first place.

@snoyberg snoyberg added this to the 0.3.0.0 milestone Jul 22, 2015
@k-bx
Copy link
Contributor Author

k-bx commented Jul 22, 2015 via email

@snoyberg
Copy link
Contributor

Alright, should be working this time, can you test it out?

@k-bx
Copy link
Contributor Author

k-bx commented Jul 22, 2015

@snoyberg works like a charm, thank you!

@k-bx k-bx closed this as completed Jul 22, 2015
@vlatkoB
Copy link

vlatkoB commented Aug 12, 2015

What do you think about allowing resolver: global in project's stack.yaml as well?

@gibiansky
Copy link

For the record, it's really unintuitive that argument order matters, and that

stack install --resolver nightly ihaskell

fails while

stack --resolver nightly install ihaskell

works.

I'm not sure if this is on purpose, though...?

@borsboom
Copy link
Contributor

@gibiansky: see #519

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

No branches or pull requests

6 participants