feat(nix): add bun version check workflow#16742
Open
DanConwayDev wants to merge 1 commit intoanomalyco:devfrom
Open
feat(nix): add bun version check workflow#16742DanConwayDev wants to merge 1 commit intoanomalyco:devfrom
DanConwayDev wants to merge 1 commit intoanomalyco:devfrom
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).
Contributor
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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