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 x.py check src/librustdoc as an alias for x.py check src/tools/rustdoc #84585

Merged
merged 1 commit into from
Apr 29, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Apr 26, 2021

I keep making this typo, it would be nice for it to be supported.

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Apr 26, 2021
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 26, 2021
@@ -292,7 +292,7 @@ macro_rules! tool_check_step {
const DEFAULT: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path($path)
run.path($path) $(.path($alias))*
Copy link
Member

Choose a reason for hiding this comment

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

This is not quite right -- we likely want to use paths(&[...]) here, which sets up a set of paths all describing the same thing, rather than different things on the same Step. We're not always consistent about that but it's the intended API usage.

This is basically intended to support the use case of test library/core library/std not testing alloc; these checks don't really support it anyway, but I'd prefer to use the right API. If it's a pain to make the macro play nice with that then no worries.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure thing, done. It was pretty simple:

diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index 786cca14863..536843d4ec2 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -292,7 +292,7 @@ impl Step for $name {
             const DEFAULT: bool = true;
 
             fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
-                run.path($path) $(.path($alias))*
+                run.paths(&[ $path, $($alias),* ])
             }
 
             fn make_run(run: RunConfig<'_>) {

@Mark-Simulacrum
Copy link
Member

r=me with nit fixed if it's not too hard, otherwise just r=me

@Mark-Simulacrum Mark-Simulacrum 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 Apr 28, 2021
@jyn514
Copy link
Member Author

jyn514 commented Apr 28, 2021

@bors r=Mark-Simulacrum rollup

@bors
Copy link
Contributor

bors commented Apr 28, 2021

📌 Commit b28754a has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 28, 2021
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Apr 28, 2021
…crum

Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`

I keep making this typo, it would be nice for it to be supported.
jackh726 added a commit to jackh726/rust that referenced this pull request Apr 28, 2021
…crum

Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`

I keep making this typo, it would be nice for it to be supported.
jackh726 added a commit to jackh726/rust that referenced this pull request Apr 29, 2021
…crum

Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`

I keep making this typo, it would be nice for it to be supported.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 29, 2021
Rollup of 11 pull requests

Successful merges:

 - rust-lang#84484 (Don't rebuild rustdoc and clippy after checking bootstrap)
 - rust-lang#84530 (`test tidy` should ignore alternative `build` dir patterns)
 - rust-lang#84531 (Ignore commented out lines when finding features)
 - rust-lang#84540 (Build sanitizers for x86_64-unknown-linux-musl)
 - rust-lang#84555 (Set `backtrace-on-ice` by default for compiler and codegen profiles)
 - rust-lang#84585 (Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`)
 - rust-lang#84636 (rustdoc: change aliases attribute to data-aliases)
 - rust-lang#84646 (Add some regression tests related to rust-lang#82494)
 - rust-lang#84661 (Remove extra word in `rustc_mir` docs)
 - rust-lang#84663 (Remove `DropGuard` in `sys::windows::process` and use `StaticMutex` instead)
 - rust-lang#84668 (Update books)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e6dce23 into rust-lang:master Apr 29, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 29, 2021
@jyn514 jyn514 deleted the check-rustdoc branch April 29, 2021 11:52
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 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.

None yet

5 participants