Skip to content

GHC version match check seems to be checking the version that Cabal was compiled with #35

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

Closed
adamse opened this issue Apr 27, 2019 · 4 comments

Comments

@adamse
Copy link

adamse commented Apr 27, 2019

I'm not 100% but it seems that getPackageGhcVersion is actually parsing out the GHC version that cabal-install/Cabal was built with, not the GHC version for the package.

Here's a snippet of the setup-config I have:

Saved package config for shake-0.17.8 written by Cabal-2.4.1.0 using ghc-8.4
<BLAH> exe:shake
<BLAH BLAH> /Users/adam/.stack/programs/x86_64-osx/ghc-8.6.4/bin/ghc
@adamse
Copy link
Author

adamse commented Apr 27, 2019

The setup file does contain the same information as ghc --info a bit further along, which includes the GHC version (with all version components).

@adamse
Copy link
Author

adamse commented Apr 27, 2019

I see this was already discovered in #33 (comment)

@alexwl
Copy link
Owner

alexwl commented Apr 28, 2019

You are right.

I wrongly assumed that the version of GHC from the header of setup-config is the version of GHC that was used to build the package.

It seems that this assumption may be correct when the GHC is installed by stack (because versions of GHC and Cabal are pinned), but in general, it is wrong.

I've committed the fix: 4ad872a

@adamse
Copy link
Author

adamse commented May 11, 2019

Thanks for fixing it. You have built an excellent tool here!

@adamse adamse closed this as completed May 11, 2019
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

2 participants