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

Specify version for executable install #2028

Closed
bitemyapp opened this issue Apr 12, 2016 · 5 comments
Closed

Specify version for executable install #2028

bitemyapp opened this issue Apr 12, 2016 · 5 comments

Comments

@bitemyapp
Copy link
Contributor

$ stack install ghcid-0.6.1
Run from outside a project, using implicit global project config
Using resolver: lts-5.10 from implicit global project's config file: /home/callen/.stack/global-project/stack.yaml
Populated index cache.    
Error parsing targets: Specified target version 0.6.1 for package ghcid does not match snapshot version 0.5.1

Would be nice if this worked without my editing ~/.stack/global-project/stack.yaml. Any alternatives?

@silky
Copy link
Contributor

silky commented Apr 12, 2016

What do you expect to be able to do? You could edit your stack.yaml to point at some path where that version is available, and install it that way. Are you asking for a feature to specify that information - package location - on the command line? If so, I don't believe that's an option.

Here to me a straightforward solution would be to just clone the repo at that version and install it directly.

@bitemyapp
Copy link
Contributor Author

Looking to avoid having to edit any files, create any directories. Just want to install something and get the binary in my path.

I did end up adding it to my global stack yaml, but I don't think what I'm describing here is an unreasonable user request. It was something people could do with cabal-install.

@mgsloan
Copy link
Contributor

mgsloan commented Apr 12, 2016

I think this is a sensible idea, it's like temporarily changing the extra-deps list. Package identifiers temporarily add extra-deps. It may not be very useful for libraries, but it is indeed useful for executables. If it's a dependency of your package, then it will just get unregistered the next time you build.

Since it's easy, I've implemented it!

@mgsloan mgsloan closed this as completed Apr 12, 2016
@borsboom borsboom changed the title Specify version for executable install Specify version for executable install Apr 12, 2016
@bitemyapp
Copy link
Contributor Author

@mgsloan wow, thank you!

@luigy
Copy link
Contributor

luigy commented Apr 13, 2016

@mgsloan nice!
Also, this was a dupe of #1261 and should be closed as well :)

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

No branches or pull requests

4 participants