Skip to content

tests/ui: A New Order [1/N] #141793

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

Merged
merged 1 commit into from
May 31, 2025
Merged

tests/ui: A New Order [1/N] #141793

merged 1 commit into from
May 31, 2025

Conversation

Kivooeo
Copy link
Contributor

@Kivooeo Kivooeo commented May 30, 2025

not sure if i should say something about changes here, just part of #133895

but this is my very first time doing something like this, id love to keep contributing in this area later on, so any feedback is appreciated

also should say that im going to squash it after agreement on changes

r? @jieyouxu

mind if i name this PR series like "tests/ui: A New Order [N/N]", im not sure if it fits the project tone, so id like your approval first — but i think it sounds really neat (Star Wars reference)

this could be a first part :)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 30, 2025
@compiler-errors
Copy link
Member

compiler-errors commented May 31, 2025

pls make sure that these commits get squashed b/c we really don't need a more than one commit for every file move, since they seem to me pretty self-descriptive :>

(edit: didn't read the "also should say that im going to squash it after agreement on changes" -- thanks for mentioning it, sorry for the ping!)

@Kivooeo
Copy link
Contributor Author

Kivooeo commented May 31, 2025

@compiler-errors sure, i will squash them as soon as the review is done

@jieyouxu
Copy link
Member

jieyouxu commented May 31, 2025

Some meta remarks before I look at the actual changes since you said

but this is my very first time doing something like this, id love to keep contributing in this area later on, so any feedback is appreciated

During review time, it's fine to not have so many intermediate commits, but a good granularity I find is one commit for each test (say tests/ui/foo.rs and its associated snapshots or auxiliaries or support files). This is primarily to make it easy to look at if you move and/or rename the test, along with other changes.

  • Also, f31c93c is an example where it makes review more difficult. Please try to keep test reblessing within the same logic commit during review, e.g. say if you are changing tests/ui/foo.rs with a rename / doc change / reformat, also rebless foo.rs in that same commit. That way, the reviewer can look at the stderr/stdout snapshot and make sure nothing is unexpectedly changed.

You can also put a [WIP] in PR title while its not ready for merge, and/or include sth like

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Note

Intermediate commits are intended to help review, but will be squashed prior to merge.

What I try to do with my PR descriptions is to keep it focused about the proposed changes itself, and then leave (meta) discussions to the comments.

not sure if i should say something about changes here

You don't really need to if the changes are self-explanatory (say in commit messages or is clear from test comments). I would highlight stuff that the reviewer should pay extra attention to. Of course, backlinking to #133895 is fine.

mind if i name this PR series like "tests/ui: A New Order [N/N]", im not sure if it fits the project tone, so id like your approval first — but i think it sounds really neat (Star Wars reference)

We don't really have requirements on PR title as long as it's not completely misleading or whatever. If you'd like to use that for your series of PRs, I have no objections to that.

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, I have some suggestions

@jieyouxu
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 31, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 31, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@Kivooeo
Copy link
Contributor Author

Kivooeo commented May 31, 2025

@jieyouxu would it fine if i make this changes in one commit? or it still better to keep in separate commits

is there a strategy to find a related issue for a test?

@jieyouxu
Copy link
Member

jieyouxu commented May 31, 2025

would it fine if i make this changes in one commit? or it still better to keep in separate commits

If I were writing this PR, I would use interactive rebase to restructure my commits to one per test (during review time, prior to merge). But if that's not something you're familiar with, I don't mind if you just squash everything into one commit, as I've seen the correspondence now.

is there a strategy to find a related issue for a test?

Yes, git blame, since it usually goes back to the original commit that introduced the test. Hopefully that indicates the corresponding issue.

@compiler-errors
Copy link
Member

@jieyouxu: In general if this is going to be major ongoing work to add descriptions to test file, I'd pretty strongly prefer if we don't have hundreds of single file commits in the commit history just for cosmetic changes to tests. We have quite a few tests in the repo as I think we all know 😹.

@jieyouxu
Copy link
Member

jieyouxu commented May 31, 2025

In general if this is going to be major ongoing work to add descriptions to test file, I'd pretty strongly prefer if we don't have hundreds of single file commits in the commit history just for cosmetic changes to tests. We have quite a few tests in the repo as I think we all know 😹.

Oh to clarify, I do not mean to merge a bunch of per-test commits. I only mean during review, as trying to identify the correspondence between moved and changed tests is a PITA. I was going to ask to squash before merge. This is what I meant by

During review time

@compiler-errors
Copy link
Member

Ah, (side note maybe it's not actually worth having the convo here then) that seems like a bit of work for the author of the PR 💀 but up to the author I guess!

@Kivooeo
Copy link
Contributor Author

Kivooeo commented May 31, 2025

@jieyouxu well, i updated everything, if it's good to you, i can squash into one commit then

@Kivooeo Kivooeo changed the title Clean up some tests from tests/ui tests/ui: A New Order [1/N] May 31, 2025
@jieyouxu
Copy link
Member

@jieyouxu well, i updated everything, if it's good to you, i can squash into one commit then

BTW you can resolve my review comments if you have addressed them 😁

@jieyouxu
Copy link
Member

In any case, this seems fine now, please squash and we can send it off to the queue.

@Kivooeo
Copy link
Contributor Author

Kivooeo commented May 31, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 31, 2025
@jieyouxu
Copy link
Member

Thanks
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 31, 2025

📌 Commit afc6424 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 May 31, 2025
bors added a commit that referenced this pull request May 31, 2025
Rollup of 8 pull requests

Successful merges:

 - #140787 (Note expr being cast when encounter NonScalar cast error)
 - #141112 (std: note that `std::str::from_utf8*` functions are aliases to `<str>::from_utf8*` methods)
 - #141646 (Document what `distcheck` is intended to exercise)
 - #141740 (Hir item kind field order)
 - #141793 (`tests/ui`: A New Order [1/N])
 - #141805 (Update `compiler-builtins` to 0.1.160)
 - #141815 (Enable non-leaf Frame Pointers for mingw-w64 Arm64 Windows)
 - #141819 (Fixes for building windows-gnullvm hosts)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 282c665 into rust-lang:master May 31, 2025
9 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 31, 2025
rust-timer added a commit that referenced this pull request May 31, 2025
Rollup merge of #141793 - Kivooeo:test-reform, r=jieyouxu

`tests/ui`: A New Order [1/N]

not sure if i should say something about changes here, just part of #133895

but this is my very first time doing something like this, id love to keep contributing in this area later on, so any feedback is appreciated

also should say that im going to squash it after agreement on changes

r? `@jieyouxu`

mind if i name this PR series like "`tests/ui`: A New Order [N/N]", im not sure if it fits the project tone, so id like your approval first — but i think it sounds really neat (Star Wars reference)

this could be a first part :)
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jun 3, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#140787 (Note expr being cast when encounter NonScalar cast error)
 - rust-lang#141112 (std: note that `std::str::from_utf8*` functions are aliases to `<str>::from_utf8*` methods)
 - rust-lang#141646 (Document what `distcheck` is intended to exercise)
 - rust-lang#141740 (Hir item kind field order)
 - rust-lang#141793 (`tests/ui`: A New Order [1/N])
 - rust-lang#141805 (Update `compiler-builtins` to 0.1.160)
 - rust-lang#141815 (Enable non-leaf Frame Pointers for mingw-w64 Arm64 Windows)
 - rust-lang#141819 (Fixes for building windows-gnullvm hosts)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants