Skip to content

Assorted run-make-support maintenance #143683

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 7 commits into from
Jul 10, 2025
Merged

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Jul 9, 2025

This PR should contain no functional changes.

  • Commit 1: Removes the support library's CHANGELOG. In the very beginning, I thought maybe we would try to version this library. But this is a purely internal test support library, and it's just extra busywork trying to maintain changelog/versions. It's also hopelessly outdated.
  • Commit 2: Resets version number to 0.0.0. Ditto on busywork.
  • Commit 3: Bump run-make-support to Edition 2024. The support library was already "compliant" with Edition 2024.
  • Commit 4: Slightly organizes the support library dependencies.
  • Commit 5: Previously, I tried hopelessly to maintain some manual formatting, but that was annoying because it required skipping rustfmt (so export ordering etc. could not be extra formatted). Give up, and do some rearrangements / module prefix tricks to get the lib.rs looking at least reasonable. IMO this is not a strict improvement, but I rather regain the ability to auto-format it with rustfmt.
  • Commit {6,7}: Noticed in Make sure fmt-write-bloat doesn't vacuously pass on no symbols #143669 that we apparently had both {is_msvc, is_windows_msvc}. This PR removes is_msvc in favor of is_windows_msvc to make it unambiguous (and only retain one way of gating) as there are some UEFI targets which are MSVC but not Windows.

Best reviewed commit-by-commit.

r? @Kobzol

jieyouxu added 5 commits July 9, 2025 20:02
Hopelessly outdated, and this support library is purely internal.
Purely internal test support library.
Even if the formatting isn't strictly "better", it at least allows
rustfmtting it automatically.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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 Jul 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 9, 2025

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@Kobzol
Copy link
Member

Kobzol commented Jul 9, 2025

👍 on removing the changelog, I also thought several times that it's futile to try to do this. Also looks like all targets containing msvc currently end with windows-msvc, so it shouldn't be a behavior change.

You can r=me after CI is green.

@jieyouxu
Copy link
Member Author

jieyouxu commented Jul 9, 2025

Also looks like all targets containing msvc currently end with windows-msvc, so it shouldn't be a behavior change.

I would be very concerned if we had non-Windows targets that ended with msvc 😆 (technically it should be more like .ends_with("-msvc") but yeah).

@petrochenkov
Copy link
Contributor

UEFI targets are MSVC, but not windows (in terms of rustc_target, not sure how this maps on compiletest checks).

@jieyouxu
Copy link
Member Author

jieyouxu commented Jul 9, 2025

Okay, in that case I'll go the inverse direction, and change this to is_windows_msvc to be unambiguous.

@jieyouxu jieyouxu 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 Jul 9, 2025
@jieyouxu
Copy link
Member Author

Changes since last reviewed:

  • Removed is_msvc in favor of the more clear is_windows_msvc.
  • Changed run-make tests to use is_windows_msvc only.

@jieyouxu
Copy link
Member Author

@rustbot review

@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 Jul 10, 2025
@@ -3,9 +3,6 @@
//! notably is built via cargo: this means that if your test wants some non-trivial utility, such
//! as `object` or `wasmparser`, they can be re-exported and be made available through this library.

// We want to control use declaration ordering and spacing (and preserve use group comments), so
// skip rustfmt on this file.
#![cfg_attr(rustfmt, rustfmt::skip)]
#![warn(unreachable_pub)]
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to have the option to configure rustfmt through some magic comment directly in the file :)

Copy link
Member Author

@jieyouxu jieyouxu Jul 10, 2025

Choose a reason for hiding this comment

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

The underlying reason for this particular skip is that rustfmt doesn't really tie comments to use statements, so they get moved all over the place.

Ignoring a whole file to rustfmt seems usually undesirable, so I think it's fine we don't have such magic comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I meant more like a comment that changes e.g. the use grouping method only for a given file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I see.

@Kobzol
Copy link
Member

Kobzol commented Jul 10, 2025

You can r=me once CI is green.

@jieyouxu
Copy link
Member Author

PR CI is 🟢
@bors r=Kobzol rollup

@bors
Copy link
Collaborator

bors commented Jul 10, 2025

📌 Commit 3f4f23a has been approved by Kobzol

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 Jul 10, 2025
bors added a commit that referenced this pull request Jul 10, 2025
Rollup of 12 pull requests

Successful merges:

 - #136906 (Add checking for unnecessary delims in closure body)
 - #143652 (docs: document trait upcasting rules in `Unsize` trait)
 - #143657 (Resolver: refact macro map into external and local maps)
 - #143659 (Use "Innermost" & "Outermost" terminology for `AttributeOrder`)
 - #143663 (fix: correct typo in attr_parsing_previously_accepted message key)
 - #143666 (Re-expose nested bodies in rustc_borrowck::consumers)
 - #143668 (Fix VxWorks build errors)
 - #143670 (Add a new maintainer to the wasm32-wasip1 target)
 - #143675 (improve lint doc text)
 - #143683 (Assorted `run-make-support` maintenance)
 - #143695 (Auto-add `S-waiting-on-author` when the PR is/switches to draft state)
 - #143706 (triagebot.toml: ping lolbinarycat if tidy extra checks were modified)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b5b35f1 into rust-lang:master Jul 10, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 10, 2025
rust-timer added a commit that referenced this pull request Jul 10, 2025
Rollup merge of #143683 - jieyouxu:rms-cleanup, r=Kobzol

Assorted `run-make-support` maintenance

This PR should contain no functional changes.

- Commit 1: Removes the support library's CHANGELOG. In the very beginning, I thought maybe we would try to version this library. But this is a purely internal test support library, and it's just extra busywork trying to maintain changelog/versions. It's also hopelessly outdated.
- Commit 2: Resets version number to `0.0.0`. Ditto on busywork.
- Commit 3: Bump `run-make-support` to Edition 2024. The support library was already "compliant" with Edition 2024.
- Commit 4: Slightly organizes the support library dependencies.
- Commit 5: Previously, I tried hopelessly to maintain some manual formatting, but that was annoying because it required skipping rustfmt (so export ordering etc. could not be extra formatted). Give up, and do some rearrangements / module prefix tricks to get the `lib.rs` looking at least *reasonable*. IMO this is not a strict improvement, but I rather regain the ability to auto-format it with rustfmt.
- Commit {6,7}: Noticed in #143669 that we apparently had *both* {`is_msvc`, `is_windows_msvc`}. This PR removes `is_msvc` in favor of `is_windows_msvc` to make it unambiguous (and only retain one way of gating) as there are some UEFI targets which are MSVC but not Windows.

Best reviewed commit-by-commit.

r? `@Kobzol`
@jieyouxu jieyouxu deleted the rms-cleanup branch July 10, 2025 17:04
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 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