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

Specifying compiler for `stack path` is not working anymore #2123

Closed
quyse opened this Issue May 11, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@quyse
Contributor

quyse commented May 11, 2016

I have a project I build with two compilers simultaneously (specifically, server and client part of which built by ghc and ghcjs respectively). With stack 1.0.4.3 I can do this:

> stack path --compiler ghcjs-0.2.0_ghc-7.10.3 --local-install-root
/home/user/project/.stack-work/install/x86_64-linux/lts-5.14/ghcjs-0.2.0_ghc-7.10.2

Since stack 1.1.0 I get:

> stack path --compiler ghcjs-0.2.0_ghc-7.10.3 --local-install-root
Invalid argument `ghcjs-0.2.0_ghc-7.10.3'
Auxiliary command not found in path `stack-path'
File does not exist or is not a regular file `path'

Looks like in 2f7755d --compiler has been added to stack path as an option to print out path to compiler's binary, which overrides general meaning of --compiler as an option specifying compiler to use. --compiler still works in other commands as before, for example in stack build.

Could the new --compiler option be renamed to something else? Is there a way now to get compiler-specific stack paths?

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented May 11, 2016

Argh! Seems like this is a regression of #519

stack --compiler ghc-7.10.3 path --local-install-root works

@quyse

This comment has been minimized.

Contributor

quyse commented May 11, 2016

@mgsloan Well, for me it doesn't look like regression of #519. It's simply because newly added stack path-specific --compiler option clashes with general --compiler option, isn't it?
Anyway, as you suggested, specifying --compiler before path works. I was certain I checked that variant too, and it wasn't working, but now it works. Probably I messed up something while looking at this. Thanks! At least there's a way to fix my scripts.

@sjakobi

This comment has been minimized.

Contributor

sjakobi commented May 11, 2016

@quyse: As a workaround you can simply run

stack --compiler ghcjs-0.2.0_ghc-7.10.3 path --local-install-root

instead.

Ah sorry, I had overlooked some comment's here.

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented May 12, 2016

My mistake, we shouldn't have used --compiler as a new flag for stack path. I've opened #2126 about how we can avoid this mistake in the future.

mgsloan added a commit that referenced this issue May 12, 2016

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented May 12, 2016

I've pushed a commit to master that renames stack path --compiler to stack path --compiler-exe. I don't like how windows-ey the name is. If someone can think up something better, there's still time to change it!

I think this might be a good thing for a bugfix release - #2127

@mgsloan mgsloan closed this May 12, 2016

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