Skip to content

feat(nix): add bun version check workflow#16742

Open
DanConwayDev wants to merge 1 commit intoanomalyco:devfrom
DanConwayDev:ci/nix-bun-version-check
Open

feat(nix): add bun version check workflow#16742
DanConwayDev wants to merge 1 commit intoanomalyco:devfrom
DanConwayDev:ci/nix-bun-version-check

Conversation

@DanConwayDev
Copy link

Issue for this PR

Would have avoided: #12602, #12632, #13300, #13302, #13458, #13828, #15394, #15635, #15648
Supersedes #13496

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Every bun bump since the Jan 18 nix overhaul has broken nix run github:anomalyco/opencode — 3 for 3, with 7 tagged releases shipping broken. The problem is widespread enough that the nixpkgs opencode package now patches out the bun version check to avoid it. Each fix was a one-line flake.lock bump that no CI check was catching, so this adds a lightweight 30-second check to do exactly that.

The check runs nix eval --inputs-from . --raw nixpkgs#bun.version and compares it to package.json. It only triggers when those two files are touched. Approach suggested by @gigamonster256 on #13496 as a lighter alternative to nix build. Complementary to #12175 which catches eval-time errors but not this version mismatch.

How did you verify your code works?

Tested on a fork: https://github.com/DanConwayDev/opencode/actions/runs/22571065110/job/65379180175
package.json: bun@1.3.10
nixpkgs: bun@1.3.10
Versions match.
Completed in 39 seconds.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Add a lightweight CI check that compares the bun version in package.json
against the version provided by the nixpkgs revision in flake.lock, using
`nix eval --inputs-from . --raw nixpkgs#bun.version`. This is much cheaper
than a full `nix build` and directly targets the version mismatch problem
that caused anomalyco#13300 (and recurred on dev with 1.3.10).

The workflow only runs when package.json or flake.lock are touched, and
completes in seconds rather than minutes.

Supersedes anomalyco#13496 (which used `nix build` as suggested by @gigamonster256).
Also related: anomalyco#12175 (nix-eval workflow), anomalyco#13302 (earlier nixpkgs bump).
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

ci(nix): add build check on pull requests

Why it's related: The current PR (16742) explicitly "Supersedes #13496". PR #13496 was attempting to address the same underlying issue of catching nix/bun version mismatches with CI checks. However, the current PR uses a lighter approach (30-second nix eval check) rather than a full nix build, as suggested by @gigamonster256 on #13496.

No other duplicate PRs found addressing the same bun version check workflow issue.

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.

1 participant