Skip to content

Cargo.lock version=4 breaks backward compatibility with Rust < 1.78 #55

@tiran

Description

@tiran
  • hf_transfer 0.1.9
  • Python 3.11 / 3.12
  • Rust 1.75

The commit 16bbc50 bumped the Cargo.lock version from v3 to v4. The change is not present in the main branch, only in the commit that leads to v0.1.9 tag. The bump to version = 4 broke backwards compatibility with Rust < 1.78. Cargo.lock v4 was introduced in Rust 1.78 and became default in 1.83.

From Cargo changelog:

Cargo 1.83 (2024-11-28):
Lockfile format v4 is now the default for creating/updating a lockfile. Rust toolchains 1.78+ support lockfile v4. For compatibility with earlier MSRV, consdier setting the package.rust-version to 1.82 or earlier.

hf_transfer builds fine with older Rust version. I'm rebuilding hf_transfer from source on a platform with Rust 1.75. I guess you created the 0.1.9 release on a machine with Rust 1.83.

Would you accept a PR that adds MSRV to Cargo.toml and updates CI.yaml to test with that MSRV? MSRV can be at least 1.75, maybe older.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions