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

Add different entry points for x.py #80596

Closed
jyn514 opened this issue Jan 1, 2021 · 1 comment
Closed

Add different entry points for x.py #80596

jyn514 opened this issue Jan 1, 2021 · 1 comment
Assignees
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Jan 1, 2021

Summary

As shown by #78466, https://internals.rust-lang.org/t/experience-report-contributing-to-rust-lang-rust/12012, and #59864 (comment) have shown, people are still having trouble with bootstrapping even after the changes to defaults and the new explanations in the bootstrapping chapter of the dev-guide. Part of the issue is that x.py's job is inherently complicated, and that most of the commands are ambiguous once you take stages into account. It would be great to have smaller commands that are focused on specific groups of contributors, so you can choose the build steps unambiguously and give helpful errors when they don't make sense.

Proposed Solution

Have an x.py in many different directories that has settings for that directory. For example, library/x.py build would be the same as x.py build library/test --stage 0 today, and library/x.py doc would be the same as x.py doc --stage 0 library/std today. For other more complicated tools, the defaults would be different: src/tools/rustdoc/x.py doc would be the same as x.py doc --stage 1, compiler/x.py build would be the same as x.py build --stage 1 library/std.

These are the entrypoints I propose:

.
├── compiler
│   ├── rustc
│   └── x.py
├── library
│   ├── std
│   └── x.py
├── Makefile
├── src
│   └── tools
│       └── rustdoc
│           └── x.py
└── x.py

The top-level x.py would still be the same as it is today.

For library/ especially, I think this would be a low-maintenance, high-impact way to greatly simplify the build process.

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-feature-request Category: A feature request, i.e: not implemented / a PR. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Jan 1, 2021
@jyn514 jyn514 self-assigned this Jan 1, 2021
@jyn514
Copy link
Member Author

jyn514 commented Jan 1, 2021

Closing in favor of rust-lang/compiler-team#396, this is big enough it should be an MCP.

@jyn514 jyn514 closed this as completed Jan 1, 2021
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 C-feature-request Category: A feature request, i.e: not implemented / a PR. 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

1 participant