Skip to content

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Apr 7, 2024

Before this PR, if you have a revisioned //@ run-rustfix test like //@[foo] run-rustfix, you would run into an error saying crate name cannot contain . characters because the fixed test file trying to be compiled is named <test-name>.<revision>.fixed, from which rustc infers the crate name to be <test-name>.<revision> which is not a valid crate name.

This PR fixes the problem by constructing a synthetic crate name from <test-name>.<revision>, by

  1. replacing all - with _, and
  2. replacing all . with __

and pass that constructed crate name with --crate-name to rustc to compile the fixed file.

Fixes #123596.

@rustbot
Copy link
Collaborator

rustbot commented Apr 7, 2024

r? @pnkfelix

rustbot has assigned @pnkfelix.
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-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 Apr 7, 2024
@jieyouxu jieyouxu changed the title Properly handle revisioned run-rustfix tests compiletest: properly handle revisioned run-rustfix tests Apr 7, 2024
@rust-cloud-vms rust-cloud-vms bot force-pushed the compiletest-run-rustfix-revisions branch from d042ee9 to de3857e Compare April 7, 2024 17:06
Copy link
Member

@WaffleLapkin WaffleLapkin left a comment

Choose a reason for hiding this comment

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

Thanks!
r? WaffleLapkin
r=me with green CI

@rustbot rustbot assigned WaffleLapkin and unassigned pnkfelix Apr 7, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Apr 7, 2024

@bors r=@WaffleLapkin

@bors
Copy link
Collaborator

bors commented Apr 7, 2024

📌 Commit de3857e has been approved by WaffleLapkin

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 Apr 7, 2024
@bors
Copy link
Collaborator

bors commented Apr 7, 2024

⌛ Testing commit de3857e with merge 9d5cdf7...

@bors
Copy link
Collaborator

bors commented Apr 7, 2024

☀️ Test successful - checks-actions
Approved by: WaffleLapkin
Pushing 9d5cdf7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 7, 2024
@bors bors merged commit 9d5cdf7 into rust-lang:master Apr 7, 2024
@rustbot rustbot added this to the 1.79.0 milestone Apr 7, 2024
@jieyouxu jieyouxu deleted the compiletest-run-rustfix-revisions branch April 7, 2024 20:31
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9d5cdf7): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.8% [0.3%, 1.5%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.9% [-5.5%, -2.7%] 5
Improvements ✅
(secondary)
-2.7% [-5.1%, -0.8%] 51
All ❌✅ (primary) -3.9% [-5.5%, -2.7%] 5

Cycles

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-3.6%, -2.5%] 6
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 667.569s -> 665.855s (-0.26%)
Artifact size: 318.50 MiB -> 318.49 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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
None yet
Development

Successfully merging this pull request may close these issues.

compiletest: run-rustfix and revisions have broken interactions
6 participants