Skip to content

Comments

ghc: Use --hash-unit-ids when supported#391889

Merged
sternenseemann merged 1 commit intoNixOS:stagingfrom
mpickering:wip/hash-unit-ids
Apr 10, 2025
Merged

ghc: Use --hash-unit-ids when supported#391889
sternenseemann merged 1 commit intoNixOS:stagingfrom
mpickering:wip/hash-unit-ids

Conversation

@mpickering
Copy link
Contributor

The compilers produced by nixpkgs don't use the detailed ABI hash.

("Project Unit Id","ghc-9.10.1-inplace")

which should rather be

("Project Unit Id","ghc-9.10.1-"))

This flag is supported on ghc-9.8 and upwards.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Mar 21, 2025
@nix-owners nix-owners bot requested review from maralorn and sternenseemann March 21, 2025 16:19
@github-actions github-actions bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Mar 21, 2025
@nix-owners nix-owners bot requested review from cdepillabout and guibou March 21, 2025 16:28
@sternenseemann
Copy link
Member

Why is this not the default behavior of hadrian? (Given that it's not documented it's not very discoverable…) Would there be any reason to turn this off?

@mpickering
Copy link
Contributor Author

@sternenseemann It is going to become the default, you should also enable it when distributing. I think it has been opt-in until now just-in-case there were any unforeseen issues with the change to using hashes.

See MR: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13444

@sternenseemann
Copy link
Member

@mpickering Then I'd actually lean towards making this unconditional and now adding an hashUnitIds input.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 2, 2025
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 8, 2025
@mpickering
Copy link
Contributor Author

@sternenseemann Now that https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13444 has landed, hash-unit-ids will be the default when you use the release flavour in 9.14.

I updated the patch to always enable it for supported versions. Can you take it from here?

@sternenseemann sternenseemann changed the base branch from master to staging April 9, 2025 23:02
The compilers produced by nixpkgs don't use the detailed ABI hash.

("Project Unit Id","ghc-9.10.1-inplace")

which should rather be

("Project Unit Id","ghc-9.10.1-<HASH>"))

This flag is supported on ghc-9.8 and upwards.

From 9.14, this behaviour will be enabled by default.

https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13444

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
@github-actions github-actions bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Apr 9, 2025
@sternenseemann sternenseemann merged commit ff96d81 into NixOS:staging Apr 10, 2025
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants