Skip to content

Include the GHC "Project Unit Id" in the cabal store path #9618

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

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

alt-romes
Copy link
Collaborator

  • This allows the use of several API incompatible builds of the same version of GHC without corrupting the cabal store.
  • This relies on the "Project Unit Id" which is available since GHC 9.8.1, older versions of GHC do not benefit from this change.

This PR is an alternative to #9325. It changes the store path from e.g. [...]store/ghc-9.8.1 to [..]store/ghc-9.8.1-f7d8.
It is a continuation of #9326 that rebases and finalizes it.

[fixes #8114]

@alt-romes alt-romes force-pushed the abi-tag-in-store-path branch 3 times, most recently from c674aed to 644317d Compare January 16, 2024 17:09
@alt-romes alt-romes requested review from andreabedini, philderbeast and Mikolaj and removed request for philderbeast January 16, 2024 18:42
@alt-romes alt-romes force-pushed the abi-tag-in-store-path branch from 644317d to dcf36d2 Compare January 16, 2024 19:48
Copy link
Collaborator

@andreabedini andreabedini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alt-romes alt-romes force-pushed the abi-tag-in-store-path branch 3 times, most recently from 65f8722 to 129ec22 Compare January 17, 2024 08:37
@alt-romes
Copy link
Collaborator Author

Quick question about normalization:
Now, with ghc >= 9.8, the ghc store dir will have an additional "-" with the compiler's ABI.
When normalizing tests, should we always include - in the store dir string?

I initially wanted to add - when the ghc did indeed have an ABI hash, however, this won't work because the test output must be the same across different GHC versions. So I'm thinking we should just keep and normalize the ABI hash away (thus, no -).

An alternative is to always include -, even when there wasn't one...

@alt-romes alt-romes force-pushed the abi-tag-in-store-path branch from 129ec22 to e6024fd Compare January 17, 2024 10:18
@alt-romes
Copy link
Collaborator Author

I've gone ahead and done the latter, to glob the ABI hash as part of the GHC version. This way the normalization is consistent across GHC versions.

@alt-romes alt-romes added the merge me Tell Mergify Bot to merge label Jan 17, 2024
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jan 19, 2024
sol and others added 2 commits January 19, 2024 11:07
- This allows the use of several **API incompatible builds of the same
  version of GHC** without corrupting the cabal store.
- This relies on the "Project Unit Id" which is available since GHC
  9.8.1, older versions of GHC do not benefit from this change.

[fixes haskell#8114]
This complements the previous commit in order to fix haskell#9326
@Mikolaj Mikolaj force-pushed the abi-tag-in-store-path branch from e6024fd to dd19cfa Compare January 19, 2024 11:08
@mergify mergify bot merged commit 1a8b93c into haskell:master Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cabal does not consider GHC ABI
4 participants