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

Comments

Projects
None yet
6 participants
@k-bx
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 snoyberg closed this in c957812 Jul 21, 2015

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jul 21, 2015

OK, give it a shot now on master.

@k-bx

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

snoyberg commented Jul 22, 2015

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

This comment has been minimized.

Contributor

k-bx commented Jul 22, 2015

snoyberg added a commit that referenced this issue Jul 22, 2015

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jul 22, 2015

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

@k-bx

This comment has been minimized.

Contributor

k-bx commented Jul 22, 2015

@snoyberg works like a charm, thank you!

@k-bx k-bx closed this Jul 22, 2015

@vlatkoB

This comment has been minimized.

vlatkoB commented Aug 12, 2015

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

@gibiansky

This comment has been minimized.

gibiansky commented Aug 14, 2015

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

This comment has been minimized.

Contributor

borsboom commented Aug 14, 2015

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