rust-lang / crater

Run experiments across parts of the Rust ecosystem!
https://crater.rust-lang.org
643 stars 90 forks source link

ignore `rust-toolchain` file in crates building in sandboxed env #560

Closed yaahc closed 3 years ago

yaahc commented 3 years ago

From a comment in https://github.com/rust-lang/rust/pull/75180 about a regression not being caught in artichoke by crater.


@yaahc @Dylan-DPC I pulled the rustops/crates-build-env container and Artichoke builds successfully in it, but I did notice that the rustup-installed cargo initiated an install of the toolchain specified in Artichoke's rust-toolchain file. I'm guessing this type of network activity is what the crater sandbox prevents.

Given that crater's intent is to build projects with specific versions of rustc, I think it makes sense to ignore rust-toolchain files in the repository if they are present.

Originally posted by @lopopolo in https://github.com/rust-lang/rust/issues/75180#issuecomment-767912621

pietroalbini commented 3 years ago

Looking into this. It might actually be the cause of all those "error"s.

pietroalbini commented 3 years ago

Ok, opened #561 with a fix (bringing in https://github.com/rust-lang/rustwide/pull/52).

Turns out the error was not rust-toolchain, as Rustwide bypasses that already (the file does not matter when you call cargo +toolchain). The problem was rustwide removing all path dependencies from the Cargo.toml, thus breaking the build.

pietroalbini commented 3 years ago

This should be fixed now!