-
Notifications
You must be signed in to change notification settings - Fork 696
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
Include the compiler ABI tag in nix-style package hashes #9325
Conversation
compilerId = CompilerId GHC ghcVersion | ||
|
||
compilerAbiTag :: AbiTag | ||
compilerAbiTag = maybe NoAbiTag AbiTag (Map.lookup "Project Unit Id" ghcInfoMap >>= stripPrefix (prettyShow compilerId <> "-")) |
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.
@bgamari is "Project Unit Id" the proper ABI identifier?
I see ghc-9.8.1-f7d8
in mine.
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.
Let me understand. GHC does not actually offer anything called ABI tag/identifier/hash? We are going to use this Project Unit Id
? Is this the right thing to do?
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.
Project Unit Id
is indeed a reasonable thing to use here. Indeed it was specifically added to avoid mixing compilation artifacts from different compilers.
My question is: why don't we separate the directories in |
Yeah, I think that makes sense. Initially, I thought this would require to change the |
I am leaving comments on both PRs :)
I suggest we follow this second option: it does not invalidate previous cache (not that big deal but the least we change the better), "unknown" in the path does not communicate anything to the user (they won't know what it "unknown"). |
Copying here my comment in the other PR:
See other thread. |
Closing in favor of #9326. |
"Project Unit Id"
which is available since GHC 9.8.1, older versions of GHC will not benefit from this changecompiler-abi-tag
tounknown
for pre-9.8.1 GHSs. This invalidates store entries that have been populated by previous versions ofcabal
. Another option would be to leave outcompiler-abi-tag
for pre-9.8.1 GHSs.