Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustbuild with verbose fails with custom `cargo` path #41779
Comments
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton ping ? it is a regress for stable |
This comment has been minimized.
This comment has been minimized.
|
Sounds bad! |
brson
added
E-help-wanted
P-medium
labels
Jun 15, 2017
Mark-Simulacrum
self-assigned this
Jun 15, 2017
This comment has been minimized.
This comment has been minimized.
|
Will investigate. |
This comment has been minimized.
This comment has been minimized.
|
Hm, I'm unable to reproduce. @semarie Could you post a log with the failure? |
This comment has been minimized.
This comment has been minimized.
|
The problem is in impl Flags {
pub fn parse(args: &[String]) -> Flags {
// [...]
// All subcommands can have an optional "Available paths" section
if matches.opt_present("verbose") {
let flags = Flags::parse(&["build".to_string()]);
let mut config = Config::default();
config.build = flags.build.clone();
let mut build = Build::new(flags, config);
metadata::build(&mut build);
let maybe_rules_help = step::build_rules(&build).get_help(subcommand);
if maybe_rules_help.is_some() {
extra_help.push_str(maybe_rules_help.unwrap().as_str());
}
} else {
extra_help.push_str(format!("Run `./x.py {} -h -v` to see a list of available paths.",
subcommand).as_str());
}
// [...]
}
}For calling In my configuration, the Here a log a build of
The
|
This was referenced Jun 16, 2017
This comment has been minimized.
This comment has been minimized.
|
I confirm this with Rust 1.18.0 (building using 1.17.0, as described in #42543). |
This comment has been minimized.
This comment has been minimized.
|
#42695 fixes this issue. |
semarie commentedMay 6, 2017
When rustbuild is invoked with
-v,extra_helpvariable is populate usingmetadata::build()(for any command). It will callcargo metadatafor several crates.The build configuration used is at this place is
Config::default().As I use
config.tomlto setcargobinary path, the setting is ignored, and rustbuild fails when-vis on command-line: by default it usesstage0_rootpath, andcargobinary isn't available at this place.