Warn on redundant --cfg directive when revisions are used by clubby789 · Pull Request #131925 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation10 Commits1 Checks6 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

clubby789

@rustbot

Some changes occurred in src/tools/compiletest

cc @jieyouxu

Some changes occurred in tests/ui/sanitizer

cc @rust-lang/project-exploit-mitigations, @rcvalle

jieyouxu

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, you can r=me after addressing the nit.

@@ -468,7 +468,13 @@ impl<'test> TestCx<'test> {
if let Some(revision) = self.revision {
let normalized_revision = normalize_revision(revision);
cmd.args(&["--cfg", &normalized_revision]);
let cfg_arg = ["--cfg", &normalized_revision];
if self.props.compile_flags.windows(2).any(|args

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: IIRC, the compile_flags splitting is naive above (e.g. --meow="foo bar" -> -meow="foo and bar" but it's better than nothing here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag splitter knows how to handle '--meow=foo bar', but in all other cases it will naïvely split on whitespace yeah.

Urgau

@jieyouxu

Not sure of the best way to test this

At the moment the directive handling is neigh untestable, which is why I am still figuring out a design to rework it. I'm okay with YOLOing this change in before that is possible, though.

@clubby789

jieyouxu

@clubby789

@bors

📌 Commit d82a21f has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Oct 19, 2024

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Oct 19, 2024

@matthiaskrgr

…r=jieyouxu

Warn on redundant --cfg directive when revisions are used

r? @jieyouxu

Fixes rust-lang#131390 Not sure of the best way to test this

This was referenced

Oct 19, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Oct 19, 2024

@bors

…iaskrgr

Rollup of 12 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Oct 20, 2024

@rust-timer

Rollup merge of rust-lang#131925 - clubby789:redundant-revision-cfg, r=jieyouxu

Warn on redundant --cfg directive when revisions are used

r? @jieyouxu

Fixes rust-lang#131390 Not sure of the best way to test this

Labels

A-compiletest

Area: The compiletest test runner

A-testsuite

Area: The testsuite used to check the correctness of rustc

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.