Skip to content

pass build.npm from bootstrap to tidy and use it for npm install #144317

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
Jul 24, 2025

Conversation

lolbinarycat
Copy link
Contributor

@lolbinarycat lolbinarycat commented Jul 22, 2025

followup to #142924

r? @Kobzol

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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) labels Jul 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 22, 2025

There are changes to the tidy tool.

cc @jieyouxu

@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the tidy-obey-build.npm branch from 53219e8 to 666fadf Compare July 22, 2025 17:45
@lolbinarycat lolbinarycat force-pushed the tidy-obey-build.npm branch from 666fadf to 2d1fccd Compare July 22, 2025 17:46
Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -29,6 +29,7 @@ fn main() {
let concurrency: NonZeroUsize =
FromStr::from_str(&env::args().nth(4).expect("need concurrency"))
.expect("concurrency must be a number");
let npm: PathBuf = env::args_os().nth(5).expect("need name/path of npm command").into();
Copy link
Member

Choose a reason for hiding this comment

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

We might want to think about using clap here soon... 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we're going to refactor how bootstrap passes args to internal tools, I would prefer we use something more type-safe and typo-safe than manually serializing and deserializing args at every process boundary, especially considering these tools aren't really meant to be called directly.

my immediate thought would be putting some types into build_helper which get serialized into json blobs that get passed to tools and deserialized. I actually tried doing this in a limited form with compiletest all the way back in #135653, trying to reduce the amount of code that has to be kept in sync on both sides.

Copy link
Member

Choose a reason for hiding this comment

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

I don't know if some people don't use tidy or compiletest outside of bootstrap 🤷 But if not, then yeah, we might make the interface be more machine processing friendly.

@Kobzol
Copy link
Member

Kobzol commented Jul 22, 2025

@bors delegate+

You can r=me once PR CI is green.

@bors
Copy link
Collaborator

bors commented Jul 22, 2025

✌️ @lolbinarycat, you can now approve this pull request!

If @Kobzol told you to "r=me" after making some further change, please make that change, then do @bors r=@Kobzol

@lolbinarycat
Copy link
Contributor Author

@bors r=@Kobzol

@bors
Copy link
Collaborator

bors commented Jul 22, 2025

📌 Commit 2d1fccd 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 22, 2025
fmease added a commit to fmease/rust that referenced this pull request Jul 23, 2025
…r=Kobzol

pass build.npm from bootstrap to tidy and use it for npm install

followup to rust-lang#142924

r? `@Kobzol`
@fmease
Copy link
Member

fmease commented Jul 23, 2025

CI failure in rollup, not sure if it's due to this PR? Feels unlikely but it's the only one that touched bootstrap. Sorry in advance if I'm misjudging.

#144380 (comment)
@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 23, 2025
@fmease fmease closed this Jul 23, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 23, 2025
@fmease fmease reopened this Jul 23, 2025
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 23, 2025
@fmease
Copy link
Member

fmease commented Jul 23, 2025

Nah, it's a different PR. Also occurred in different PR: #144382 (comment)

@bors r=Kobzol

@bors
Copy link
Collaborator

bors commented Jul 23, 2025

📌 Commit 2d1fccd has been approved by Kobzol

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 23, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 23, 2025
fmease added a commit to fmease/rust that referenced this pull request Jul 24, 2025
…r=Kobzol

pass build.npm from bootstrap to tidy and use it for npm install

followup to rust-lang#142924

r? `@Kobzol`
bors added a commit that referenced this pull request Jul 24, 2025
Rollup of 15 pull requests

Successful merges:

 - #132748 (get rid of some false negatives in rustdoc::broken_intra_doc_links)
 - #143374 (Unquerify extern_mod_stmt_cnum.)
 - #143838 (std: net: uefi: Add support to query connection data)
 - #144014 (don't link to the nightly version of the Edition Guide in stable lints)
 - #144094 (Ensure we codegen the main fn)
 - #144218 (Use serde for target spec json deserialize)
 - #144221 (generate elf symbol version in raw-dylib)
 - #144240 (Add more test case to check if the false note related to sealed trait suppressed)
 - #144247 (coretests/num: use ldexp instead of hard-coding a power of 2)
 - #144276 (Use less HIR in check_private_in_public.)
 - #144317 (pass build.npm from bootstrap to tidy and use it for npm install)
 - #144320 (rustdoc: avoid allocating a temp String for aliases in search index)
 - #144334 (rustc_resolve: get rid of unused rustdoc::span_of_fragments_with_expansion)
 - #144335 (Don't suggest assoc ty bound on non-angle-bracketed problematic assoc ty binding)
 - #144358 (Stop using the old `validate_attr` logic for stability attributes)

r? `@ghost`
`@rustbot` modify labels: rollup
fmease added a commit to fmease/rust that referenced this pull request Jul 24, 2025
…r=Kobzol

pass build.npm from bootstrap to tidy and use it for npm install

followup to rust-lang#142924

r? ``@Kobzol``
bors added a commit that referenced this pull request Jul 24, 2025
Rollup of 16 pull requests

Successful merges:

 - #143374 (Unquerify extern_mod_stmt_cnum.)
 - #143838 (std: net: uefi: Add support to query connection data)
 - #144014 (don't link to the nightly version of the Edition Guide in stable lints)
 - #144094 (Ensure we codegen the main fn)
 - #144218 (Use serde for target spec json deserialize)
 - #144221 (generate elf symbol version in raw-dylib)
 - #144232 (Implement support for `become` and explicit tail call codegen for the LLVM backend)
 - #144240 (Add more test case to check if the false note related to sealed trait suppressed)
 - #144247 (coretests/num: use ldexp instead of hard-coding a power of 2)
 - #144276 (Use less HIR in check_private_in_public.)
 - #144278 (add Rev::into_inner)
 - #144317 (pass build.npm from bootstrap to tidy and use it for npm install)
 - #144320 (rustdoc: avoid allocating a temp String for aliases in search index)
 - #144334 (rustc_resolve: get rid of unused rustdoc::span_of_fragments_with_expansion)
 - #144335 (Don't suggest assoc ty bound on non-angle-bracketed problematic assoc ty binding)
 - #144358 (Stop using the old `validate_attr` logic for stability attributes)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 24, 2025
Rollup of 15 pull requests

Successful merges:

 - #143374 (Unquerify extern_mod_stmt_cnum.)
 - #143838 (std: net: uefi: Add support to query connection data)
 - #144014 (don't link to the nightly version of the Edition Guide in stable lints)
 - #144094 (Ensure we codegen the main fn)
 - #144218 (Use serde for target spec json deserialize)
 - #144221 (generate elf symbol version in raw-dylib)
 - #144240 (Add more test case to check if the false note related to sealed trait suppressed)
 - #144247 (coretests/num: use ldexp instead of hard-coding a power of 2)
 - #144276 (Use less HIR in check_private_in_public.)
 - #144278 (add Rev::into_inner)
 - #144317 (pass build.npm from bootstrap to tidy and use it for npm install)
 - #144320 (rustdoc: avoid allocating a temp String for aliases in search index)
 - #144334 (rustc_resolve: get rid of unused rustdoc::span_of_fragments_with_expansion)
 - #144335 (Don't suggest assoc ty bound on non-angle-bracketed problematic assoc ty binding)
 - #144358 (Stop using the old `validate_attr` logic for stability attributes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 352e02b into rust-lang:master Jul 24, 2025
22 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 24, 2025
rust-timer added a commit that referenced this pull request Jul 24, 2025
Rollup merge of #144317 - lolbinarycat:tidy-obey-build.npm, r=Kobzol

pass build.npm from bootstrap to tidy and use it for npm install

followup to #142924

r? ```@Kobzol```
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 A-tidy Area: The tidy tool 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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants