-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Labels
A-LinterRelated to the linter and custom lintsRelated to the linter and custom lintsC-DependenciesA change related to dependenciesA change related to dependenciesS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrongX-BlessedHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makersHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Milestone
Description
Our NixOS friends don't use Rustup, so they currently have no way to use the linter! We may be able to get around this, but we'll have to find a replacement that works without Rustup for the following lines:
bevy_cli/bevy_lint/src/bin/main.rs
Lines 25 to 43 in fa01e7e
let status = Command::new("rustup") | |
.arg("run") | |
.arg(RUST_TOOLCHAIN_CHANNEL) | |
.arg("cargo") | |
.arg("check") | |
// Forward all arguments to `cargo check` except for the first, which is the path to the | |
// current executable. | |
.args(std::env::args().skip(1)) | |
// This instructs `rustc` to call `bevy_lint_driver` instead of its default routine. | |
// This lets us register custom lints. | |
.env("RUSTC_WORKSPACE_WRAPPER", driver_path) | |
// Rustup on Windows does not modify the `PATH` variable by default so a toolchain-specific | |
// version of `cargo` or `rustc` is not accidentally run instead of Rustup's proxy version. | |
// This isn't desired for us, however, because we need the `PATH` modified to discover and | |
// link to `rustc_driver.dll`. Setting `RUSTUP_WINDOWS_PATH_ADD_BIN=1` forces Rustup to | |
// modify the path. For more info, please see <https://github.com/rust-lang/rustup/pull/3703>. | |
.env("RUSTUP_WINDOWS_PATH_ADD_BIN", "1") | |
.status() | |
.context("Failed to spawn `cargo check`.")?; |
Metadata
Metadata
Assignees
Labels
A-LinterRelated to the linter and custom lintsRelated to the linter and custom lintsC-DependenciesA change related to dependenciesA change related to dependenciesS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrongX-BlessedHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makersHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makers