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

Fails to build with minimal versions #556

Closed
konstin opened this issue Jan 22, 2025 · 3 comments · Fixed by #557
Closed

Fails to build with minimal versions #556

konstin opened this issue Jan 22, 2025 · 3 comments · Fixed by #557

Comments

@konstin
Copy link

konstin commented Jan 22, 2025

In pubgrub, we're using ron = "=0.9.0-alpha.0". I can't build pubgrub with

cargo +nightly check -Zminimal-versions

due to ron not being compatible with the lowest versions it declares:

error[E0277]: the trait bound `usize: Bits` is not satisfied
 --> /home/konsti/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ron-0.9.0-alpha.0/src/extensions.rs:6:28
  |
6 |     pub struct Extensions: usize {
  |                            ^^^^^ the trait `Bits` is not implemented for `usize`
  |
  = help: the following other types implement trait `Bits`:
            i128
            i16
            i32
            i64
            i8
            u128
            u16
            u32
          and 2 others
note: required by a bound in `bitflags::BitFlags::Bits`
 --> /home/konsti/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.0.0/src/traits.rs:8:16
  |
8 |     type Bits: Bits;
  |                ^^^^ required by this bound in `BitFlags::Bits`

error[E0277]: the trait bound `usize: Bits` is not satisfied
 --> /home/konsti/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ron-0.9.0-alpha.0/src/extensions.rs:6:28
  |
6 |     pub struct Extensions: usize {
  |                            ^^^^^ the trait `Bits` is not implemented for `usize`
  |
  = help: the following other types implement trait `Bits`:
            i128
            i16
            i32
            i64
            i8
            u128
            u16
            u32
          and 2 others

Building ron itself with -Zminimal-versions, there a bigger number of build errors:

rm Cargo.lock && cargo +nightly check -Zminimal-versions

Output: https://gist.github.com/konstin/c4a9cd2ad9170e1ae3e476f5946db5ee

Would it be possible to tighten the lower bounds so that downstream crates can test with minimal versions?

konstin added a commit to astral-sh/pubgrub that referenced this issue Jan 22, 2025
We don't actually support v1 anymore, we need the `FxBuildHasher` introduced in v2.

We still can't build with minimal versions due to ron-rs/ron#556
konstin added a commit to astral-sh/pubgrub that referenced this issue Jan 22, 2025
We don't actually support v1 anymore, we need the `FxBuildHasher` introduced in v2.

We still can't build with minimal versions due to ron-rs/ron#556
konstin added a commit to astral-sh/pubgrub that referenced this issue Jan 22, 2025
We don't actually support v1 anymore, we need the `FxBuildHasher` introduced in v2.

We still can't build with minimal versions due to ron-rs/ron#556
github-merge-queue bot pushed a commit to pubgrub-rs/pubgrub that referenced this issue Jan 22, 2025
We don't actually support v1 anymore, we need the `FxBuildHasher` introduced in v2.

We still can't build with minimal versions due to ron-rs/ron#556
@juntyr
Copy link
Member

juntyr commented Jan 25, 2025

Thanks for the report @konstin! I've opened #557 - could you check if that would fix your issue, if so I'll merge it and publish a new pre-release.

@konstin
Copy link
Author

konstin commented Jan 27, 2025

Thanks, this fixes it!

@juntyr
Copy link
Member

juntyr commented Jan 27, 2025

https://crates.io/crates/ron/0.9.0-alpha.1 has now been released

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