Skip to content

Cargo.lock isn't updated along with workspace.package.version in releases #14065

@ziyao233

Description

@ziyao233

What issue are you seeing?

During releasing, workspace.package.version in Cargo.toml is updated to the version number, while Cargo.lock is not1 2. This makes Cargo.lock mismatches with Cargo.toml, and when building/fetching crates with --locked argument, cargo will fail. For example,

# cargo fetch --locked
    Updating crates.io index
error: the lock file /root/new_codex/codex-rust-v0.112.0/codex-rs/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.

To ensure reproducibility, distributions often make use of --locked argument3 to ensure the lock file is the same across different builds. Mismatches between Cargo.lock and Cargo.toml introduce extra maintenance burden for them.

What steps can reproduce the bug?

Download the release tarball or checkout to a release tag (similar issues present in both v0.112.0 and v0.111.0), run

cd codex-rs && cargo build --locked  

What is the expected behavior?

Crates are successfully fetched, and no error is reported.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions