input-output-hk / haskell.nix

Alternative Haskell Infrastructure for Nixpkgs
https://input-output-hk.github.io/haskell.nix
Apache License 2.0
552 stars 238 forks source link

`check-compiler-materialization` and `updateMaterialized` for all GHC versions in one command #1790

Open peterbecich opened 1 year ago

peterbecich commented 1 year ago

Is your feature request related to a problem? Please describe.

To ensure the materialization is up-to-date, a.f.a.i.k. it's necessary to run through every GHC version with this:

nix-build scripts/check-compiler-materialization --argstr compiler-nix-name ghcXYZ

and /nix/store/....updateMaterialized until check-compiler-materialization completes successfully: https://input-output-hk.github.io/haskell.nix/dev/adding-new-ghc.html#add-the-materialized-files

Describe the solution you'd like

nix-build scripts/check-compiler-materialization --argstr compiler-nix-name all

and calls updateMaterialized

or

nix-build scripts/check-compiler-materialization

which covers all versions and calls updateMaterialized, or

a bash script which executes check-compiler-materialization for all GHC versions and repeatedly executes /nix/store/.*-updateMaterialized as needed, similar to: https://input-output-hk.github.io/haskell.nix/tutorials/materialization.html#how-can-we-update-the-nix-files-with-a-script

Describe alternatives you've considered

What is the correct way to use the compiler-nix-names argument for multiple GHC versions? https://github.com/input-output-hk/haskell.nix/blob/85cdbaa0774921aeea43d1deb8d7cdc4272b7b4e/scripts/check-compiler-materialization/default.nix#L3

Additional context

peterbecich commented 1 year ago

Perhaps something like this:

https://github.com/input-output-hk/cicero-pipe/blob/6d4e29aa5806e1342919b3d626328abfa9e7e600/flake.nix#L55-L66 https://github.com/input-output-hk/cicero-pipe/blob/6d4e29aa5806e1342919b3d626328abfa9e7e600/flake.nix#L86-L97

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hamishmack commented 1 year ago

We should definitely try this.