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

Find GHC on PATH via version suffixes (fixes #2433) #4668

Merged
merged 1 commit into from
Mar 29, 2019

Conversation

snoyberg
Copy link
Contributor

If you enable system-ghc, and have multiple versions of GHC available,
Stack will now find the appropriate one based on the version-suffixed
name.

Note: the code in Stack.Setup is really difficult to follow at this
point. This PR makes the situation a bit worse, to avoid making this
diff larger than it has to be. A later PR to clean up Stack.Setup would
be a great idea.

Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

@fommil
Copy link

fommil commented Mar 27, 2019

Excellent! What is the failure mode if no such ghc-<version> binary is discovered?

@snoyberg
Copy link
Contributor Author

Same behavior as today essentially:

  • If install-ghc is enabled, it will download/setup GHC, failing if that's not possible
  • If it's disabled, it will give an error message about GHC not being available

If you enable system-ghc, and have multiple versions of GHC available,
Stack will now find the appropriate one based on the version-suffixed
name.

Note: the code in Stack.Setup is _really_ difficult to follow at this
point. This PR makes the situation a bit worse, to avoid making this
diff larger than it has to be. A later PR to clean up Stack.Setup would
be a great idea.
@snoyberg snoyberg force-pushed the 2433-exe-by-version branch from cdba2cf to 32eb609 Compare March 28, 2019 16:10
@snoyberg snoyberg merged commit b0f7a68 into master Mar 29, 2019
@snoyberg snoyberg deleted the 2433-exe-by-version branch February 4, 2020 12:23
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

Successfully merging this pull request may close these issues.

2 participants