compiletest: improve robustness of LLVM version handling#132315
Merged
bors merged 1 commit intorust-lang:masterfrom Oct 30, 2024
Merged
compiletest: improve robustness of LLVM version handling#132315bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
jieyouxu
commented
Oct 29, 2024
Comment on lines
-1126
to
-1131
| let version = match *components { | ||
| [a] => a * 10_000, | ||
| [a, b] => a * 10_000 + b * 100, | ||
| [a, b, c] => a * 10_000 + b * 100 + c, | ||
| _ => panic!("Malformed version"), | ||
| }; |
onur-ozkan
reviewed
Oct 29, 2024
Member
Author
|
@rustbot author |
a7b20ef to
8b92efb
Compare
Member
Author
|
(Brought back a few specific test cases, no functional changes) |
This comment has been minimized.
This comment has been minimized.
8b92efb to
e419b3d
Compare
Collaborator
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
Member
Author
|
Changes since last review:
@rustbot ready |
onur-ozkan
approved these changes
Oct 30, 2024
Contributor
onur-ozkan
left a comment
There was a problem hiding this comment.
LGTM - Waiting for CI.
This was referenced Oct 30, 2024
Contributor
|
@bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 30, 2024
Rollup of 6 pull requests Successful merges: - rust-lang#130098 (Reject generic self types.) - rust-lang#131096 (rustdoc: Remove usage of `allow(unused)` attribute on `no_run` merged doctests) - rust-lang#132315 (compiletest: improve robustness of LLVM version handling) - rust-lang#132346 (Some graphviz tweaks) - rust-lang#132359 (Fix AIX libc call char type from i8 to u8) - rust-lang#132360 (Un-vacation myself) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 30, 2024
Rollup merge of rust-lang#132315 - jieyouxu:extract-llvm-version, r=onur-ozkan compiletest: improve robustness of LLVM version handling Previously, `extract_llvm_versions` did some gymnastics for llvm versions by combining `(major, minor, patch)` into a combined version integer, but that is not very robust and made it difficult to add `max-llvm-major-version`. This PR tries to: - Improve llvm version handling robustness by parsing and representing the version as a semver. We intentionally deviate from strict semver standards by allowing omission of minor and patch versions. They default to `0` when absent. This is for convenience to allow the user to write e.g. `//@ min-llvm-version: 18` instead of having to spell out the full `major.minor.patch` semver string `//@ min-llvm-verison: 18.0.0`. - Adjust some panic messages to include a bit more context about *why* the version string was rejected. Prerequisite for rust-lang#132310. r? bootstrap (or compiler)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously,
extract_llvm_versionsdid some gymnastics for llvm versions by combining(major, minor, patch)into a combined version integer, but that is not very robust and made it difficult to addmax-llvm-major-version. This PR tries to:0when absent. This is for convenience to allow the user to write e.g.//@ min-llvm-version: 18instead of having to spell out the fullmajor.minor.patchsemver string//@ min-llvm-verison: 18.0.0.Prerequisite for #132310.
r? bootstrap (or compiler)