Skip to content

[beta] Backport #48252 #48340

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

Merged
merged 3 commits into from
Feb 19, 2018
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
8 changes: 7 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
@@ -217,7 +217,7 @@ impl StepDescription {
}

if !attempted_run {
eprintln!("Warning: no rules matched {}.", path.display());
panic!("Error: no rules matched {}.", path.display());
}
}
}
@@ -385,6 +385,12 @@ impl<'a> Builder<'a> {
Subcommand::Clean { .. } => panic!(),
};

if let Some(path) = paths.get(0) {
if path == Path::new("nonexistent/path/to/trigger/cargo/metadata") {
return;
}
}

let builder = Builder {
build,
top_stage: build.config.stage.unwrap_or(2),
8 changes: 2 additions & 6 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
@@ -278,9 +278,7 @@ Arguments:
let src = matches.opt_str("src").map(PathBuf::from)
.or_else(|| env::var_os("SRC").map(PathBuf::from))
.unwrap_or(cwd.clone());
let paths = matches.free[1..].iter().map(|p| {
cwd.join(p).strip_prefix(&src).expect("paths passed to be inside checkout").into()
}).collect::<Vec<PathBuf>>();
let paths = matches.free[1..].iter().map(|p| p.into()).collect::<Vec<PathBuf>>();

let cfg_file = matches.opt_str("config").map(PathBuf::from).or_else(|| {
if fs::metadata("config.toml").is_ok() {
@@ -380,9 +378,7 @@ Arguments:
cmd,
incremental: matches.opt_present("incremental"),
exclude: split(matches.opt_strs("exclude"))
.into_iter().map(|p| {
cwd.join(p).strip_prefix(&src).expect("paths to be inside checkout").into()
}).collect::<Vec<_>>(),
.into_iter().map(|p| p.into()).collect::<Vec<_>>(),
src,
}
}