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

whereis with no version tries the recommended, rather than active version #988

Open
hseg opened this issue Jan 22, 2024 · 4 comments
Open

Comments

@hseg
Copy link

hseg commented Jan 22, 2024

Running ghcup whereis ghc behaves like ghcup whereis recommended.
In particular, if one is on a system where the recommended ghc version is not installed (even if the "active ghc" is set appropriately using ghcup set ghc to an existing version), this spuriously gives GHCup-00130 errors.

@hasufell
Copy link
Member

This is by design. You're proposing a different design. But are you aware that you can have no GHC version set at all? What does it do then? Also fail?

I agree it might be slightly more intuitive for it to return the set version, but it's a breaking change.

How do we migrate? It can break scripts, CIs etc.

@hseg
Copy link
Author

hseg commented Jan 23, 2024 via email

@hasufell
Copy link
Member

Could we at least teach whereis a new version default evaluating to the set version?

Finding the set version is pretty easy via:

ghcup whereis bindir
$(ghcup whereis bindir)/ghc --version

@hseg
Copy link
Author

hseg commented Jan 27, 2024 via email

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

2 participants