huggingface / huggingface/hf_transfer

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

Open
#55 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
580
Forks
41
Avg merge
7m
Merged PRs (30d)
1

Description

- hf_transfer 0.1.9
- Python 3.11 / 3.12
- Rust 1.75

The commit https://github.com/huggingface/hf_transfer/commit/16bbc5045ff4036be9d8bcd0050108d82229a216 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](https://github.com/huggingface/hf_transfer/tree/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](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md):
> 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.