Skip to content
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

Don't build rustc_middle for x.py build src/tools/rustfmt #82206

Open
jyn514 opened this issue Feb 17, 2021 · 3 comments
Open

Don't build rustc_middle for x.py build src/tools/rustfmt #82206

jyn514 opened this issue Feb 17, 2021 · 3 comments
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-rustfmt Area: Rustfmt C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Feb 17, 2021

Rustfmt only depends on the parser, not type checking, and building rustc_middle greatly increases the time it takes to build.

$ x.py build --stage 0 src/tools/rustfmt
Updating only changed submodules
Submodules updated in 0.01 seconds
   Compiling bootstrap v0.0.0 (/home/joshua/rustc2/src/bootstrap)
    Finished dev [unoptimized + debuginfo] target(s) in 12.04s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.15s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling rustc_middle v0.0.0 (/home/joshua/rustc2/compiler/rustc_middle)
   Building [=====================>   ] 195/217: rustc_middle  
@jyn514 jyn514 added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-rustfmt Area: Rustfmt A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Feb 17, 2021
@Mark-Simulacrum
Copy link
Member

While true, it's not clear to me that we expect people to build rustfmt in tree much since it's a submodule, and I think this would increase complexity in an unfortunate way with bootstrap's current architecture based on my expectation for what it would take; I'd prefer not to do it without stronger justification.

@jyn514
Copy link
Member Author

jyn514 commented Feb 17, 2021

While true, it's not clear to me that we expect people to build rustfmt in tree much since it's a submodule, and I think this would increase complexity in an unfortunate way with bootstrap's current architecture based on my expectation for what it would take; I'd prefer not to do it without stronger justification.

I'm hoping to make rustfmt a subtree instead of a submodule: #82208. See today's discussion in #dev-tools: https://discord.com/channels/442252698964721669/459149107387170817/811347550660722749

@jyn514
Copy link
Member Author

jyn514 commented Feb 17, 2021

I think this would increase complexity in an unfortunate way with bootstrap's current architecture based on my expectation for what it would take

This is true, but I was hoping to make a similar change at some point anyway so you can e.g. run x.py build library/core and not build libstd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-rustfmt Area: Rustfmt C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

2 participants