Skip to content

Conversation

kpreid
Copy link
Collaborator

@kpreid kpreid commented Oct 17, 2025

Connections
The problematic line was introduced by #6847 and last altered by #7618.

Description
Bounds like <=5.0 should never be used unless necessary to avoid bugs, because it will cause a build failure if another package has a requirement like ~5.1.0 or >=5.1.0. Upper bounds should always cut at a major version boundary, not before it.

This PR replaces the <=5.0 bound with a well-behaved <6.0.

Testing
xtask test

Squash or Rebase?
Rebase

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

Bounds like `<=5.0` should never be used unless necessary to avoid bugs,
because it will cause a build failure if another package has a
requirement like `~5.1.0` or `>=5.1.0`. Upper bounds should always cut
at a major version boundary, not before it.
@ErichDonGubler
Copy link
Member

I'm greatly surprised by Cargo's behavior here. Does using 5.* instead of 5.0 not resolve the issue?

@ErichDonGubler ErichDonGubler enabled auto-merge (squash) October 17, 2025 18:50
@kpreid
Copy link
Collaborator Author

kpreid commented Oct 17, 2025

Does using 5.* instead of 5.0 not resolve the issue?

It seems like <=5.* would in fact do so, but the meaning of that syntax is not documented, and I have never seen anyone else using it.

@ErichDonGubler ErichDonGubler merged commit 585397c into gfx-rs:trunk Oct 17, 2025
41 checks passed
@kpreid kpreid deleted the dep branch October 17, 2025 19:09
@kpreid
Copy link
Collaborator Author

kpreid commented Oct 17, 2025

I filed rust-lang/cargo#16128 to ask for clarification about what <=5.* means.

@ErichDonGubler
Copy link
Member

@kpreid: I have observed it in the wild, but I don't remember which crate it's happened with. I know it was part of doing supporting ecosystem work necessary to support Mozilla's consumption of #6876, but 🤷🏻‍♂️ I'd have to go hunting with that knowledge in hand to find it again, I think.

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 this pull request may close these issues.

2 participants