Skip to content
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

Use the same nixpkgs revision on CI #2271

Merged
merged 6 commits into from
Dec 6, 2024
Merged

Conversation

avdv
Copy link
Member

@avdv avdv commented Dec 3, 2024

This avoids pulling down a different ghc version for the example project created by the start script than is used for the tests on CI.

Even worse, I noticed that we were building ghc 9.4.6 on CI just for running the start script on macOS:

Analyzing: target //:example (39 packages loaded, 140 targets configured)
this path will be fetched (0.03 MiB download, 0.11 MiB unpacked):
  /nix/store/pcz77230xr6xr27i44gy2c7qiy2arbk2-zlib-1.3.1-dev
copying path '/nix/store/pcz77230xr6xr27i44gy2c7qiy2arbk2-zlib-1.3.1-dev' from 'https://cache.iog.io/'...
/nix/store/pcz77230xr6xr27i44gy2c7qiy2arbk2-zlib-1.3.1-dev
Analyzing: target //:example (39 packages loaded, 140 targets configured)
warning: unknown setting 'always-allow-substitutes'
Analyzing: target //:example (39 packages loaded, 140 targets configured)
this derivation will be built:
  /nix/store/x7wkr642fsv89c5922imznd2nca88dsa-ghc-9.4.6.drv

(see https://github.com/tweag/rules_haskell/actions/runs/12140138249/job/33849261707?pr=2269#step:12:575)

@avdv avdv force-pushed the cb/use-nixpkgs-rev-in-start branch 3 times, most recently from c04d9e0 to cef8cc1 Compare December 4, 2024 06:47
avdv added 2 commits December 4, 2024 08:05
This avoids pulling down a different ghc version than is used for the tests on CI.
@avdv avdv force-pushed the cb/use-nixpkgs-rev-in-start branch from cef8cc1 to fe62c52 Compare December 4, 2024 07:14
Bazel expects the given hash is for the downloaded archive, but nix computes the hash
after unpacking the tarball to the nix store.
@avdv avdv marked this pull request as ready for review December 4, 2024 11:25
@avdv avdv requested a review from ylecornec December 4, 2024 11:25
Instead of exiting silently, inform the user about the problem and carry on.

Do not require a Bazel executable up front so we are still able to generate a project.
@avdv avdv added the merge-queue merge on green CI label Dec 6, 2024
@mergify mergify bot merged commit c6f2162 into master Dec 6, 2024
49 checks passed
@mergify mergify bot deleted the cb/use-nixpkgs-rev-in-start branch December 6, 2024 09:31
@mergify mergify bot removed the merge-queue merge on green CI label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants