Skip to content

Conversation

sellout
Copy link
Contributor

@sellout sellout commented Mar 12, 2025

Overview

This re-enables some automatic running of Nix build & cache population.

Unlike before it was disabled, this doesn’t run on PRs, only on release branches and trunk. The former lets us pin releases for quick comparisons and downstream usage, while the latter keeps the dev tools up-to-date and gives us an early warning if the Nix build breaks (without getting in the way of PRs).

It’s still possible to run manually, which is helpful to test PRs like this, which affect the Nix tooling, as well as ensuring that Nix tooling changes are propagated to the cache before they’re merged into trunk.

Implementation notes

This also has a couple other non-cache-breaking changes, like separating out the Nix documentation from other dev docs as well as separating out the tool versions and referencing them from the docs as well.

Test coverage

This re-enables the testing of the Nix build in CI, but in a less obtrusive way than before.

Loose ends

There are other Nix changes that have been waiting, like #5486, but this is a low-effort improvement that is worth getting in before those anyway.

Also, it might be useful to have this workflow automatically trigger on changes to paths matching “nix” and a couple others that are referenced by the Nix build, but I think this is good for now.

sellout added 4 commits March 12, 2025 14:05
Instead of doing it for every PR push, only run it for trunk & releases.
The former keeps an up-to-date dev environment in the cache (and lets us
know if something needs to be fixed before the next release) while the
latter gives us something to pin for downstream consumers (and quick
access to releases when bisecting for bugs, etc.).
Since it’s not the primary build tool, this gets it out of the way and
allows for more detailed Nix documentation without overwhelming the core
docs.
And reference them in the development docs, so contributors can more
easily discover what versions we use.
@sellout sellout requested a review from a team as a code owner March 12, 2025 21:57
@sellout
Copy link
Contributor Author

sellout commented Mar 12, 2025

Oh yeah, and I manually ran the workflow on this PR, so I could check that the re-addition of aarch64-darwin succeeded: https://github.com/sellout/unison/actions/runs/13821109924/job/38666414462

vscodeSettings."haskell.toolchain"
## There are some things we want to pin that the VS Code Haskell extension doesn’t let us control.
// {
hpack = "0.35.2";
Copy link
Contributor

Choose a reason for hiding this comment

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

I have seen some hpack 0.37 slipping in, so we may want to bump this too at some point.

-- This file has been generated from package.yaml by hpack version 0.37.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good call. In #5486, I mention that 0.36 is the minimum supported by our pinned stack version, so it’s even inconsistent within the current Nix environment. I should rebase that, now that this is merged, and see if the cache issue is gone.

@aryairani aryairani merged commit a775871 into unisonweb:trunk Mar 18, 2025
17 checks passed
@sellout sellout deleted the nix-in-ci branch March 19, 2025 14:19
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