Add CI job for checking stdlib semver compatibility - #160253
Conversation
|
This PR modifies If appropriate, please update Warning If you are changing how CI LLVM is built or linked, make sure to bump cc @jieyouxu This PR modifies If appropriate, please update |
|
@bors try jobs=x86_64-gnu-stdlib-semver-check |
Add CI job for checking stdlib semver compatibility try-job: x86_64-gnu-stdlib-semver-check
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 79f5ace failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
|
@bors try jobs=x86_64-gnu-stdlib-semver-check |
This comment has been minimized.
This comment has been minimized.
Add CI job for checking stdlib semver compatibility try-job: x86_64-gnu-stdlib-semver-check
|
I expect quite a few semver breaking changes over the development of nightly features, how are contributors supposed to bypass the CI for changes that are okay? What about stable feature where the breakage is accepted? |
|
That's a very good question, that I don't yet know the answer to :) In terms of implementation, we could have some file in the standard library subtree (something like the LLVM bootstrap stamp files) that could be manually bumped in PRs that expect a breaking change. And for those PRs the test would just be green. |
|
A file-based bypass sounds good to me. |
|
Just a note that I don't expect CI to be red over development of nightly features. If it would be useful to have a separate report that also considers unstable features' breakage, that's easy enough to add as well (just remove a flag from the invocation) but probably beyond the scope of this PR. |
| - name: x86_64-gnu-stdlib-semver-check | ||
| <<: *job-linux-4c |
There was a problem hiding this comment.
Remark: also thinking about the failure handling
This CI job installs the latest published version of
cargo-semver-checksand then runs thex test std-semver-checkbootstrap command added in #159671.If csc finds semver breakage, the job will fail. If csc cannot parse the rustdoc JSON data (e.g. because the format was bumped), the job will print an error, but it will not fail.
One thing I'm not sure about is whether the stdlib will actually run into any breakages (or perceived breakages, from the perspective of csc), and how to deal with that, because then the job would just be red and the PR couldn't be merged. We could make the job optional, but we don't yet have a good mechanism for finding out about failures from optional jobs (that can be added later though).
CC @rust-lang/libs @obi1kenobi
r? @jieyouxu (for bootstrap and CI stuff)