Open JohanLorenzo opened 8 years ago
I added that not so much to help with people doing a rustup, but more to warn people that are not up to date anymore. I think the current still provides that (unless we don't have to rebuild the foxbox crate which should not happen often in a rustup).
Indeed it's annoying in general that build.rs is not processed first. I don't know what the cargo people would be willing to take, but if we could add a "rustc-version = ..." check in the main Cargo.toml that would be the simplest thing for us.
I guess the other option is, like Servo, to not call cargo directly but to use a wrapper script that does these kind of checks (Servo uses mach
that is also used in gecko).
Linking to #449 where mach was also proposed
I agree, mach would be a good actionable alternative.
STR
2016-05-30
. Revision tested:2016-05-22
git pull upstream master
cargo build
Results
Cargo understands there's a new Cargo.lock, fetches the new dependencies and compiles them. For example:
This shows
build.rs
is called after dependencies are build (so right before foxbox is compiled).cargo clean && cargo build
returns the same error.I added a
panic!()
inbuild.rs
, this is what is happening:Impact
Rust ups are usually broken by dependencies, this makes the check done in
build.rs
nearly useless. Moreover, this might give a false sense of a graceful failure.The cargo documentation is a little bit ambiguous about the order of build.
Therefore, I don't know if we should raise a bug in rust-lang/cargo or remove
check_rustc_version()
inbuild.rs
. What's your take on this, @fabricedesre ?