-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
bootstrap: extract builder cargo to its own module #131728
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
/// `rustc_parse::parser::Parser`. See `rustc_builtin_macros::cmdline_attrs::inject` for more | ||
/// information. | ||
#[derive(Debug, Clone)] | ||
struct Rustflags(String, TargetSelection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rustflags
and HostFlags
apparently are only used for builder-cargo-related purposes, so I could make it default visibility here.
This comment has been minimized.
This comment has been minimized.
63648ac
to
d2ad6e6
Compare
☔ The latest upstream changes (presumably #131767) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased to fix merge conflicts, no functional changes. |
r? @onur-ozkan I don't have a strong opinion on this sort of refactoring (file length is not really a strong indicator IMO, and in some ways I prefer fewer files over more). But leaving it to others to do fine-grained review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, waiting for rebase
☔ The latest upstream changes (presumably #131970) made this pull request unmergeable. Please resolve the merge conflicts. |
I found builder.rs to be a massive file which made it hard to digest. To make `RUSTFLAGS` usage hardening easier later, I extracted the cargo part in `builder.rs` into its own module.
This was specifically because I was trying to figure out and localize the cargo-specific parts of |
Rebased, no functional changes. |
@bors r+ |
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#126588 (Added more scenarios where comma to be removed in the function arg) - rust-lang#131728 (bootstrap: extract builder cargo to its own module) - rust-lang#131968 (Rip out old effects var handling code from traits) - rust-lang#131981 (Remove the `BoundConstness::NotConst` variant) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131728 - jieyouxu:boopstrap, r=onur-ozkan bootstrap: extract builder cargo to its own module I was looking at our cargo rustflags/rustdocflags usages, and I found `builder.rs` to be a large file which made it hard to digest. This PR tries to break out the cargo command wrapper parts to its own submodule to make it easier to identify builder cargo-specific logic. This PR: - Extracts the cargo command wrapper to its own module and also move `Builder::{bare_,}cargo` impl to the submodule. - Reorganizes some imports in `lib.rs` (no functional changes). - Slightly adjusts some docs in `builder.rs`. This PR is basically just moving code around, and should not contain any functional changes. Before this PR, `builder.rs` was 2743 lines. After this PR, `builder.rs` is down to a more manageable 1386 lines and `cargo.rs` is 1085 lines.
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#126588 (Added more scenarios where comma to be removed in the function arg) - rust-lang#131728 (bootstrap: extract builder cargo to its own module) - rust-lang#131968 (Rip out old effects var handling code from traits) - rust-lang#131981 (Remove the `BoundConstness::NotConst` variant) r? `@ghost` `@rustbot` modify labels: rollup
I was looking at our cargo rustflags/rustdocflags usages, and I found
builder.rs
to be a largefile which made it hard to digest. This PR tries to break out the cargo command wrapper parts to
its own submodule to make it easier to identify builder cargo-specific logic.
This PR:
Builder::{bare_,}cargo
implto the submodule.
lib.rs
(no functional changes).builder.rs
.This PR is basically just moving code around, and should not contain any functional changes.
Before this PR,
builder.rs
was 2743 lines. After this PR,builder.rs
is down to a moremanageable 1386 lines and
cargo.rs
is 1085 lines.