Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blake3 sdists 1.0.1 / 1.0.2 are not compatible with Rust < 1.78 (Cargo.lock v4) #56

Closed
tiran opened this issue Jan 24, 2025 · 5 comments · Fixed by #57
Closed

blake3 sdists 1.0.1 / 1.0.2 are not compatible with Rust < 1.78 (Cargo.lock v4) #56

tiran opened this issue Jan 24, 2025 · 5 comments · Fixed by #57

Comments

@tiran
Copy link
Contributor

tiran commented Jan 24, 2025

The source distributions blake3-1.0.2.tar.gz and 1.0.1 contain a Cargo.lock file with new lock format v4. This makes the sdists incompatible with Rust < 1.78. The Rust code itself builds fine with toolchain 1.75 and maybe even older versions. The sdist blake3-1.0.0.tar.gz contains a Cargo.lock v3.

I guess your build system creates the sdist with latest stable version of Rust toolchain. Cargo.lock v4 support was added in Rust 1.78 and became the default in 1.83. Could you please add an appropriate MSRV to Cargo.toml to generate a v3 Cargo.lock?

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.

See huggingface/hf_transfer#55 / huggingface/hf_transfer#58 for the same type of issue

@ddelange
Copy link
Collaborator

@tiran could you open a PR?

@tiran
Copy link
Contributor Author

tiran commented Jan 24, 2025

Already working on a PR and figuring out the lowest possible MSRV. 1.66 seems to do the trick:

  • error: package constant_time_eq v0.3.1 cannot be built because it requires rustc 1.66.0 or newer

tiran added a commit to tiran/blake3-py that referenced this issue Jan 24, 2025
Rust 1.83 bumped the `Cargo.lock` format to `v4`. Specify and test a
lower MSRV to force `Cargo.lock` format `v3`. The oldest working rustc
version is 1.66:

```
error: package `constant_time_eq v0.3.1` cannot be built because it requires rustc 1.66.0 or newer
```

Fixes: oconnor663#56
Signed-off-by: Christian Heimes <[email protected]>
@tiran
Copy link
Contributor Author

tiran commented Jan 24, 2025

Rust 1.66 is the oldest toolchain that can compile blake3 and its dependencies. Our build pipeline is currently on Rust 1.75. I chose the older version just in case somebody else needs to build with an even older toolchain.

For comparison, latest PyCA cryptography release 44.0 has MSRV 1.65, https://github.com/pyca/cryptography/blob/44.0.0/Cargo.toml#L19

@tiran
Copy link
Contributor Author

tiran commented Jan 24, 2025

@ddelange I didn't bump the release version in my PR. You have tagged the last commit as 1.0.3, but package version is still 1.0.2.

@ddelange
Copy link
Collaborator

damn, thanks for opening #58

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 a pull request may close this issue.

2 participants