Skip to content
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

Add "reference" as a known compiletest header #131382

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Oct 7, 2024

This adds the "reference" compiletest header so that the Rust reference can add annotations to the test suite in order to link tests to individual rules in the reference.

Tooling in the reference repo will be responsible for collecting these annotations and linking to the tests.

More details are in MCP 783: rust-lang/compiler-team#783

There is a change from the MCP in that I am not adding the JSON collection to compiletest (at least, not yet). In looking at this more closely, that actually makes things more difficult for our tooling, so I'm leaving it out for now. If in the future it looks like something we want, then I think we can add it later.

There are a few tests here which need adjusting due to the legacy header check. @jieyouxu indicated on Zulip that we could potentially remove the legacy header check, in which case those changes can be dropped from this PR.

r? @jieyouxu

@rustbot
Copy link
Collaborator

rustbot commented Oct 7, 2024

Could not assign reviewer from: jieyouxu.
User(s) jieyouxu are either the PR author, already assigned, or on vacation, and there are no other candidates.
Use r? to specify someone else to assign.

@rustbot
Copy link
Collaborator

rustbot commented Oct 7, 2024

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Oct 7, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 7, 2024

Some changes occurred in src/tools/compiletest

cc @jieyouxu

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@rust-log-analyzer

This comment has been minimized.

@jieyouxu jieyouxu assigned jieyouxu and unassigned davidtwco Oct 7, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Oct 7, 2024

I'll drop the legacy directive checks before this PR, it's been at least 6 months since we migrated from // to //@.

@jieyouxu
Copy link
Member

jieyouxu commented Oct 8, 2024

PR dropping the legacy directive check: #131392

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 8, 2024
…heck, r=Urgau

Drop compiletest legacy directive check

Sufficient time has passed (> 6 months) since we migrated from `//` to `//`@`,` so let's drop the
legacy directive check as it causes friction due to false positives.

As a side-effect, dropping the legacy directive check simplifies the directive scanning logic.

The legacy directive check was originally added to help people be aware of the migration.

Blocker for rust-lang#131382 cc `@ehuss.`

Can be reviewed by any compiler/bootstrap reviewer.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 8, 2024
Rollup merge of rust-lang#131392 - jieyouxu:remove-legacy-directive-check, r=Urgau

Drop compiletest legacy directive check

Sufficient time has passed (> 6 months) since we migrated from `//` to `//`@`,` so let's drop the
legacy directive check as it causes friction due to false positives.

As a side-effect, dropping the legacy directive check simplifies the directive scanning logic.

The legacy directive check was originally added to help people be aware of the migration.

Blocker for rust-lang#131382 cc `@ehuss.`

Can be reviewed by any compiler/bootstrap reviewer.
This adds the "reference" compiletest header so that the Rust reference
can add annotations to the test suite in order to link tests to
individual rules in the reference.

Tooling in the reference repo will be responsible for collecting these
annotations and linking to the tests.

More details are in MCP 783: rust-lang/compiler-team#783
@ehuss ehuss force-pushed the compiletest-reference branch from fe33856 to de60931 Compare October 9, 2024 13:21
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks! Could you also update dev-guide about a new directive (even if it's a no-op currently).

@jieyouxu
Copy link
Member

jieyouxu commented Oct 9, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 9, 2024

📌 Commit de60931 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 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#131382 (Add "reference" as a known compiletest header)
 - rust-lang#131420 (Dont ICE when encountering post-mono layout cycle error)
 - rust-lang#131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`)
 - rust-lang#131426 (Fix quotation marks around debug line in `src/ci/run.sh`)
 - rust-lang#131435 (Ignore broken-pipe-no-ice on apple (specifically macOS) for now)
 - rust-lang#131447 (add more crash tests)
 - rust-lang#131456 (Fix typo in E0793)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#131382 (Add "reference" as a known compiletest header)
 - rust-lang#131420 (Dont ICE when encountering post-mono layout cycle error)
 - rust-lang#131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`)
 - rust-lang#131426 (Fix quotation marks around debug line in `src/ci/run.sh`)
 - rust-lang#131435 (Ignore broken-pipe-no-ice on apple (specifically macOS) for now)
 - rust-lang#131447 (add more crash tests)
 - rust-lang#131456 (Fix typo in E0793)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b76667a into rust-lang:master Oct 10, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2024
Rollup merge of rust-lang#131382 - ehuss:compiletest-reference, r=jieyouxu

Add "reference" as a known compiletest header

This adds the "reference" compiletest header so that the Rust reference can add annotations to the test suite in order to link tests to individual rules in the reference.

Tooling in the reference repo will be responsible for collecting these annotations and linking to the tests.

More details are in MCP 783: rust-lang/compiler-team#783

There is a change from the MCP in that I am not adding the JSON collection to compiletest (at least, not yet). In looking at this more closely, that actually makes things more difficult for our tooling, so I'm leaving it out for now. If in the future it looks like something we want, then I think we can add it later.

There are a few tests here which need adjusting due to the legacy header check. `@jieyouxu` indicated on Zulip that we could potentially remove the legacy header check, in which case those changes can be dropped from this PR.

r? `@jieyouxu`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs 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.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants