Skip to content

sdist generated from workspace contains outdated Cargo.lock #2609

Description

@davidhewitt

Bug Description

Originally reported at pydantic/jiter#196

From debugging, I think what happens is:

  • rewrite_cargo_toml removes workspace crates which are not included in the sdist (in jiter case, a dev tool fuzz)
  • the Cargo.lock still contains metadata about this crate

It might be that running cargo metadata inside the sdist working dir will be good enough to invite cargo to fixup the Cargo.lock? That might be a good sanity check anyway... 🤔

Your maturin version (maturin --version)

1.8.3

Your Python version (python -V)

n/a

Your pip version (pip -V)

n/a

What bindings you're using

None

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

  1. Run maturin sdist inside jiter repository at crates/jiter-python subdirectory.
  2. cd to the target/wheels directory (will be at the workspace root)
  3. Unzip the sdist
  4. cd into the sdist
  5. cargo build --locked

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdistSource distribution

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions