Repository navigation
fix(nix): use correct version from Cargo.toml in flake build - #11770
Merged
Merged
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
rupurt
force-pushed
the
fix/nix-flake-version
branch
from
February 13, 2026 19:32
d409696 to
1038584
Compare
When building via `nix build`, the binary reported `codex-cli 0.0.0` because the workspace Cargo.toml uses `0.0.0` as a placeholder on main. This caused the update checker to always prompt users to upgrade. Read the version from `codex-rs/Cargo.toml` at flake evaluation time and patch it into the workspace before cargo builds: - Release commits (e.g. `rust-v0.101.0`): uses the real version as-is - Main branch builds: falls back to `0.0.0-dev+<shortRev>` which the update checker ignores, suppressing the spurious upgrade prompt
rupurt
force-pushed
the
fix/nix-flake-version
branch
from
February 13, 2026 19:32
1038584 to
b02aa0c
Compare
Contributor
|
@codex review |
Contributor
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
nix build, the binary reportscodex-cli 0.0.0because the workspaceCargo.tomluses0.0.0as a placeholder onmain. This causes the update checker to always prompt users to upgrade even when running the latest code.codex-rs/Cargo.tomlat flake evaluation time usingbuiltins.fromTOMLand patches it into the workspaceCargo.tomlbefore cargo builds viapostPatch.rust-v0.101.0), the real version is used as-is. Onmainbranch builds, falls back to0.0.0-dev+<shortRev>(or0.0.0-dev+dirty), which the update checker'sparse_versionignores — suppressing the spurious upgrade prompt.versionrust-v0.101.0)0.101.00.101.0codex-cli 0.101.00.0.00.0.0-dev+b934ffccodex-cli 0.0.0-dev+b934ffc0.0.00.0.0-dev+dirtycodex-cli 0.0.0-dev+dirtyTest plan
nix buildfrommainbranch and verifycodex --versionreports0.0.0-dev+<shortRev>instead of0.0.0Cargo.tomlhas a real version, the binary reports that version correctly