Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,19 @@ impl StepDescription {
}

if !attempted_run {
panic!("error: no rules matched {}", path.display());
eprintln!(
"error: no `{}` rules matched '{}'",
builder.kind.as_str(),
path.display()
);
eprintln!(
"help: run `x.py {} --help --verbose` to show a list of available paths",
builder.kind.as_str()
);
eprintln!(
"note: if you are adding a new Step to bootstrap itself, make sure you register it with `describe!`"
Copy link
Member

Choose a reason for hiding this comment

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

I think probably we should say something like "in src/bootstrap/builder.rs" here, though I guess it's not that hard to find:

$ rg 'describe!'
src/bootstrap/builder.rs
494:            Kind::Build => describe!(
525:            Kind::Check => describe!(
536:            Kind::Test => describe!(
591:            Kind::Bench => describe!(test::Crate, test::CrateLibrustc),
592:            Kind::Doc => describe!(
612:            Kind::Dist => describe!(
640:            Kind::Install => describe!(
654:            Kind::Run => describe!(run::ExpandYamlAnchors, run::BuildManifest, run::BumpStage0),

So maybe alright for now, and better short for such a specific message anyway.

);
std::process::exit(1);
}
}
}
Expand Down