-
Notifications
You must be signed in to change notification settings - Fork 20
[WIP] Port to cabal-helper-1.0 (git) #33
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
Open
DanielG
wants to merge
4
commits into
alexwl:master
Choose a base branch
from
DanielG:c-h-master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+52
−85
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "vendor/cabal-helper.git"] | ||
path = vendor/cabal-helper.git | ||
url = https://github.com/DanielG/cabal-helper.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,4 @@ | |
with-compiler: ghc-8.4.4 | ||
|
||
packages: . | ||
vendor/cabal-helper-0.8.1.2 | ||
|
||
./vendor/cabal-helper.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule cabal-helper.git
added at
a078ea
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexwl did you think about this? AFAIR GHC can break hi-file format compatibility even with just a minor version bump. So really the versions would have to match exactly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seem that the version of GHC from the header of
setup-config
contains only two numbers - major and minor (showHeader
function fromCabal
usescompilerVersion
from System.Info: http://hackage.haskell.org/package/base-4.12.0.0/docs/src/System.Info.html#compilerVersion).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah damn, I totally forgot we only get two version components in the header. That won't do at all then, I'll have to revert that
compilerVersion
optimization then. I think there's just no way around actually going through the helper to get the GHC version in that case.Honestly that shouldn't be too big a deal though since that will only happen once per Cabal version, regardless of which GHC version is compiling the helper. So the error will take a while longer to pop up but when the user gets to re-trying with a different GHC the helper will already be ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH! Even worse if the header version is from System.Info like you say then this is the GHC version that compiled
Setup.hs
and not the oneSetup.hs
decided to use to build the package! Yikes, that's just completely wrong then.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that the correct version of GHC should always be taken from
LocalBuildInfo
, not from the header ofsetup-config
?