Uh oh!
There was an error while loading. Please reload this page.
feat(nix): add bun version check workflow - #16742
Conversation
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).
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 No other duplicate PRs found addressing the same bun version check workflow issue. |
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Issue for this PR
Would have avoided: #12602, #12632, #13300, #13302, #13458, #13828, #15394, #15635, #15648
Supersedes #13496
Type of change
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 nixpkgsopencodepackage now patches out the bun version check to avoid it. Each fix was a one-lineflake.lockbump 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.versionand compares it topackage.json. It only triggers when those two files are touched. Approach suggested by @gigamonster256 on #13496 as a lighter alternative tonix 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