-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Enable --check-cfg
by default in UI tests
#124345
Conversation
Some changes occurred in src/tools/compiletest cc @jieyouxu |
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.
The code changes generally look good to me. Just one question about revision normalization and some doc requests.
// Generate `cfg(FALSE, REV1, ..., REVN)` (for all possible revisions) | ||
// | ||
// For compatibility reason we consider the `FALSE` cfg to be expected | ||
// since it is extensively used in the testsuite. | ||
check_cfg.push_str("cfg(FALSE"); |
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.
Do we have any documentation for this special case? If not, could you please document this behavior in the dev-guide so that the knowledge of FALSE
being "special" exists somewhere? Or rather, if it's recommended to be used stylistically for configuring something out, can that be documented too?
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.
I'm not aware, nor was I able to find any documentation regarding FALSE
being a de-facto cfg that will eval to false.
could you please document this behavior in the dev-guide
Sure, I will send a PR for that.
EDIT: forget to send it, sorry
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.
rustc-dev-guide PR is up rust-lang/rustc-dev-guide#1966
This comment has been minimized.
This comment has been minimized.
7cefc9d
to
b6ed813
Compare
Thanks! @bors r+ rollup |
…youxu Enable `--check-cfg` by default in UI tests This PR enables-by-default `--check-cfg` in UI tests, now that it has become stable. To do so this PR does 2 main things: - it introduce the `no-auto-check-cfg` directive to `compiletest`, to prevent any `--check-cfg` args (only to be used for `--check-cfg` tests) - it updates the _remaining_[^1] UI tests by either: - allowing the lint when neither expecting the lint nor giving the check-cfg args make sense - give the appropriate check-cfg args - or expect the lint, when it useful [^1]: some preparation work was done in rust-lang#123577 rust-lang#123702 I highly recommend reviewing this PR commit-by-commit. r? `@jieyouxu`
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#124257 (Rewrite the `no-input-file.stderr` test in Rust and support diff) - rust-lang#124324 (Minor AST cleanups) - rust-lang#124327 (CI: implement job skipping in Python matrix calculation) - rust-lang#124345 (Enable `--check-cfg` by default in UI tests) r? `@ghost` `@rustbot` modify labels: rollup
Hum, apparently the Fortunately the branching of master should happen tomorrow (the 26th) and the update of stage0 sometime next week, so I think the best course of action is just to wait a couple days. |
@rustbot blocked waiting for stage0 update |
b6ed813
to
595ddb0
Compare
Thanks! @bors r+ rollup |
c897ec1
to
34dbfc3
Compare
No worries. The issue was in the |
Enable `--check-cfg` by default in UI tests This PR enables-by-default `--check-cfg` in UI tests, now that it has become stable. To do so this PR does 2 main things: - it introduce the `no-auto-check-cfg` directive to `compiletest`, to prevent any `--check-cfg` args (only to be used for `--check-cfg` tests) - it updates the _remaining_[^1] UI tests by either: - allowing the lint when neither expecting the lint nor giving the check-cfg args make sense - give the appropriate check-cfg args - or expect the lint, when it useful [^1]: some preparation work was done in rust-lang#123577 rust-lang#123702 I highly recommend reviewing this PR commit-by-commit. r? `@jieyouxu`
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
this directive prevents compiletest from adding any implicit and automatic --check-cfg arguments
34dbfc3
to
d4e26fb
Compare
☀️ Test successful - checks-actions |
Finished benchmarking commit (7dd170f): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 675.105s -> 676.427s (0.20%) |
This PR enables-by-default
--check-cfg
in UI tests, now that it has become stable.To do so this PR does 2 main things:
no-auto-check-cfg
directive tocompiletest
, to prevent any--check-cfg
args (only to be used for--check-cfg
tests)I highly recommend reviewing this PR commit-by-commit.
r? @jieyouxu
Footnotes
some preparation work was done in Do some preparation work for compiletest check-cfg #123577 Further cleanup cfgs in the UI test suite #123702 ↩