-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See servo/rust-smallvec#175 for changelog
- Loading branch information
Showing
3 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
language: rust | ||
rust: | ||
- 1.21.0 | ||
- 1.36.0 | ||
- stable | ||
- nightly | ||
sudo: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd63ded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was such a large MSRV bump released as a patch release?
cd63ded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@messense
cd63ded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all crates mark MSRV changes as breaking changes, it depends on the crate.
cd63ded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I agree in general, this crate is very low-level and used in quite a number of places, so this may have moved the MSRV for quite a number of crates in the ecosystem.
cd63ded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These crates should be pinning dependency versions if they care strongly about MSRV. Besides, users who care about msrv can pin this crate in their lockfiles: crates depending on this still satisfy their MSRV, just for a specific set of versions, which is pretty common.
The smallvec MSRV update moved to MaybeUninit which crates should be doing as soon as possible to avoid potential UB; in this case I care more about that than MSRV.
The minor bump here is good for non-MSRV reliers for the same reason it's bad for MSRV reliers: it avoids having to go across the entire ecosystem and bump everything. In this case the tradeoff is between MSRV and non-MSRV, and I've picked non-MSRV. Properly supporting MSRV here requires work that I don't have time to do.
cd63ded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for coming across as harsh; I was more seeking an explanation for the bump in a patch release (I should have worded it better). I had already bumped my crate's MSRV in CI before any response here and I wasn't expecting a revert to happen.
In my case, this crate is about 4 levels deep in the graph (reqwest -> url -> idna -> unicode-normalization). I can't pin it if they don't pin it (it's a library and, AFAIK, not using a Cargo.lock is the norm there and is ignored if it isn't an executable crate anyways (because otherwise you'd be stuck updating until all your deps update too for any crate C that A and B want to talk to each other about)).
That's a good reason to update it; I'm satisfied that this made sense. It was just a surprise when my CI started breaking last night.
I'm aware. It's very hard to ensure MSRV for a variety of reasons:
-Z minimal-versions
is not standard (I've been filing dozens of PRs to fix minimum dependency specifications over the past month or so).cfg
RFC for the Rust version should help alleviate this by at least allowing the parts of the test suite that do work to work).-Z minimal-versions
with their MSRV (harder/more tedious in CI configurations because you need nightly for thegenerate-lockfile
step and your MSRV for the rest).cd63ded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add an explicit dep on the crate you basically can. But that's kind of my point, Cargo's not designed for this, you can't impose additional requirements on transitive dependencies easily without locking down the whole dep tree. unicode-normalization mentions an MSRV but does not promise that MSRV bumps will be breaking, and I bet that's the case with most of your transitive dependencies. Folks distributing stuff on older Rust can use Cargo.lock, and crates that have a strong desire to maintain MSRV can pin transitive deps in their Cargo.toml.
A good solution here is for Cargo to support mentioning an MSRV and building for an MSRV, where it only looks for semver-compat crates that also satisfy the MSRV, when specified.