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

stack path --ghc-paths broken #1546

Closed
mboes opened this issue Dec 20, 2015 · 4 comments
Closed

stack path --ghc-paths broken #1546

mboes opened this issue Dec 20, 2015 · 4 comments
Assignees
Milestone

Comments

@mboes
Copy link
Contributor

mboes commented Dec 20, 2015

From the documentation:

  --ghc-paths              Installed GHCs (unpacked and archives)

I'm not sure how to grok the explanation of the option, but at any rate I'd expect this variable is essentially pointing me to the local GHC install that stack is using for the current project (or indeed the system installed GHC if that's what is being used).

In reality, in the stack repository I get:

/home/mboes/.stack/programs/x86_64-linux

which is a path that in fact does not exist (on my system).

@mgsloan
Copy link
Contributor

mgsloan commented Dec 21, 2015

stack path --ghc-paths tells you where stack setup will install GHC and other programs. So, if stack setup has never been used, this path won't exist. I agree that this is a confusing thing for stack path --ghc-paths to do. I propose:

  • Deprecating --ghc-paths, and adding --programs-path to provide the current functionality. Or maybe just straight up removing it.
  • Adding --ghc-path, which points to the GHC install used for the project. Would you expect the value of stack --ghc-path to be something like /usr/local/bin/ghc, or just /usr/local/?

@sjakobi
Copy link
Member

sjakobi commented Apr 6, 2016

Deprecating --ghc-paths, and adding --programs-path to provide the current functionality. Or maybe just straight up removing it.

I think that the flag loses most of it's value when there's also --ghc-path. Removing it should be ok.

Would you expect the value of stack --ghc-path to be something like /usr/local/bin/ghc, or just /usr/local/?

Personally, I would prefer the more precise result.

What should stack path --ghc-path return in the case of a GHCJS project? If it should point at the location of ghcjs in that case, should the option possibly be called --compiler-path instead?

@mgsloan
Copy link
Contributor

mgsloan commented Apr 6, 2016

Good point! I'd be in favor of having it be --compiler-path

@sjakobi sjakobi self-assigned this Apr 6, 2016
sjakobi added a commit to sjakobi/stack that referenced this issue Apr 9, 2016
sjakobi added a commit to sjakobi/stack that referenced this issue Apr 9, 2016
mgsloan added a commit that referenced this issue Apr 11, 2016
stack path: Rename --ghc-paths to --programs-path, add --compiler-path #1546
@sjakobi
Copy link
Member

sjakobi commented Apr 11, 2016

Fixed via #2016.

@sjakobi sjakobi closed this as completed Apr 11, 2016
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

3 participants