Skip to content

Commit Cargo.lock - #31

Merged
awolverp merged 2 commits into
awolverp:masterfrom
andersk:cargo-lock
Oct 7, 2026
Merged

awolverp merged 2 commits into
awolverp:masterfrom
andersk:cargo-lock

Conversation

@andersk

@andersk andersk commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Without a lockfile, every build resolves the latest compatible versions of the Rust dependencies at that moment, so a new release of any of them can change or break a build with no change to this repository, and a release can be built from different dependencies than CI tested. Cargo recommends committing Cargo.lock for packages like this one that build a binary artifact (here, the Python extension module).

Generate it with cargo generate-lockfile, and build the release wheels with --locked, so that they fail rather than silently updating it.

Without a lockfile, every build resolves the latest compatible versions
of the Rust dependencies at that moment, so a new release of any of them
can change or break a build with no change to this repository, and a
release can be built from different dependencies than CI tested.  Cargo
recommends committing Cargo.lock for packages like this one that build
a binary artifact (here, the Python extension module).

Generate it with cargo generate-lockfile, and build the release wheels
with --locked, so that they fail rather than silently updating it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@andersk
andersk force-pushed the cargo-lock branch 2 times, most recently from af4ada9 to 64c796b Compare October 6, 2026 11:31
uv pip install --group ci resolved the latest versions of the test
dependencies rather than using uv.lock, so CI didn't test the locked
versions and didn't notice when uv.lock fell out of date with
pyproject.toml.

Install them with uv sync --locked, and build with maturin develop
--locked, so that CI fails if uv.lock or Cargo.lock needs updating.
uv sync creates the virtual environment itself, with the requested
Python, and uv run runs commands in it, so drop the uv venv command and
the PATH and PYO3_PYTHON settings (maturin builds for the virtual
environment's Python).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@awolverp
awolverp merged commit 6ed38ba into awolverp:master Oct 7, 2026
12 checks passed
@andersk
andersk deleted the cargo-lock branch October 7, 2026 10:26
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.

2 participants