Skip to content

run-make-support: adjust assertion printing, add some basic sanity checks #135036

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 3 commits into from
Jan 4, 2025

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Jan 2, 2025

cc @Noratrieb

I think we may have unintentionally regressed this recently and double-printed (or printed even when the assertions didn't fail). This PR should condition the detail dumps only when the assertions fail.

Added some basic sanity checks for the assertions helpers except for the directory comparisons. That particular helper is not robust against symlinks, and I intend to address it in a follow-up (issue is #135037).

r? bootstrap (or compiler)

@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. labels Jan 2, 2025
@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 2, 2025
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

r=me with or without nits

@compiler-errors
Copy link
Member

this was very hard to diff btw lol, i had to open it in a separate diff tool 💀

@jieyouxu
Copy link
Member Author

jieyouxu commented Jan 2, 2025

Yeah sorry, I cooked this up hastly, should've made this into several commits.

@jieyouxu
Copy link
Member Author

jieyouxu commented Jan 2, 2025

If you prefer, I can properly split the commits tmrw. Actually, I'm going to do that tmrw if only to make the git blame on the assertion helpers not ass.

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

jieyouxu commented Jan 3, 2025

Changes since last review:

  • Actually properly split the changes into 3 commits:
    1. First commit only moves assertion_helpers.rs to assertion_helpers/mod.rs.
    2. Second commit introduces the basic sanity tests.
    3. Third commit fixes the assertion dump double-printing, avoids dumping even when the assertion is successful, and slightly tidies up the dump handling.
  • Reverted the REGEX vs NEEDLE distinction and param renames, just used needle consistently.
  • Added a FIXME backlinking to run-make-support: assert_dirs_are_equal traverses symlinks #135037 for the dir assertion helper.

There is only minor dump message changes (and droped the param name changes) since last review, I just tidied up the commit history to make the diff less of a pain to look at or blame.

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

jieyouxu commented Jan 3, 2025

Split into several commits and addressed the nits, so

@bors r=compiler-errors rollup

@bors
Copy link
Collaborator

bors commented Jan 3, 2025

📌 Commit 6175d73 has been approved by compiler-errors

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 Jan 3, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 3, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…r-errors

run-make-support: adjust assertion printing, add some basic sanity checks

cc `@Noratrieb`

I think we may have unintentionally regressed this recently and double-printed (or printed even when the assertions didn't fail). This PR should condition the detail dumps only when the assertions fail.

Added some basic sanity checks for the assertions helpers except for the directory comparisons. That particular helper is not robust against symlinks, and I intend to address it in a follow-up (issue is rust-lang#135037).

r? bootstrap (or compiler)
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 3, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#133420 (Switch rtems target to panic unwind)
 - rust-lang#134965 (Make Boxy UwU)
 - rust-lang#135007 (Some type-outlives computation tweaks)
 - rust-lang#135036 (run-make-support: adjust assertion printing, add some basic sanity checks)
 - rust-lang#135043 (rustdoc: treat `allowed_through_unstable_modules` as deprecation)
 - rust-lang#135044 (Improve infer (`_`) suggestions in `const`s and `static`s)
 - rust-lang#135058 (refactor bootstrap path resolution)
 - rust-lang#135061 (crashes: add latest batch of tests)

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

Rollup of 7 pull requests

Successful merges:

 - rust-lang#133420 (Switch rtems target to panic unwind)
 - rust-lang#134965 (Make Boxy UwU)
 - rust-lang#135007 (Some type-outlives computation tweaks)
 - rust-lang#135036 (run-make-support: adjust assertion printing, add some basic sanity checks)
 - rust-lang#135043 (rustdoc: treat `allowed_through_unstable_modules` as deprecation)
 - rust-lang#135044 (Improve infer (`_`) suggestions in `const`s and `static`s)
 - rust-lang#135058 (refactor bootstrap path resolution)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 564a29d into rust-lang:master Jan 4, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 4, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 4, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Rollup merge of rust-lang#135036 - jieyouxu:rmake-be-quiet, r=compiler-errors

run-make-support: adjust assertion printing, add some basic sanity checks

cc ``@Noratrieb``

I think we may have unintentionally regressed this recently and double-printed (or printed even when the assertions didn't fail). This PR should condition the detail dumps only when the assertions fail.

Added some basic sanity checks for the assertions helpers except for the directory comparisons. That particular helper is not robust against symlinks, and I intend to address it in a follow-up (issue is rust-lang#135037).

r? bootstrap (or compiler)
@jieyouxu jieyouxu deleted the rmake-be-quiet branch January 4, 2025 08:16
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-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.

None yet

5 participants