-
Notifications
You must be signed in to change notification settings - Fork 13
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
rustc_driver.dll
not found on Windows
#267
Comments
Originally discovered on Discord. |
I was able to confirm that # Switch to the directory that contains `rustc_driver.dll`
cd C:\Users\USER\.rustup\toolchains\nightly-2024-11-14-aarch64-pc-windows-msvc\bin
# Run the lint driver, which should print the help screen
bevy_lint_driver rustc --help When |
I was able to verify that fn main() {
println!("PATH={}", std::env::var("PATH").unwrap());
} Then, I compared the output of the following two commands: > .\pathfinder.exe
PATH=C:\Program Files\Parallels\Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\USER\.cargo\bin;C:\Users\USER\AppData\Local\Microsoft\WindowsApps;
> rustup run nightly-2025-01-09 .\pathfinder.exe
PATH=C:\Program Files\Parallels\Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\USER\.cargo\bin;C:\Users\USER\AppData\Local\Microsoft\WindowsApps; Diff view: - PATH=C:\Program Files\Parallels\Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\USER\.cargo\bin;C:\Users\USER\AppData\Local\Microsoft\WindowsApps;
+ PATH=C:\Program Files\Parallels\Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\USER\.cargo\bin;C:\Users\USER\AppData\Local\Microsoft\WindowsApps; Interestingly, the path is configured correctly when I run > cargo run
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s
Running `.\pathfinder.exe`
PATH=C:\Users\USER\Downloads\pathfinder\target\debug\deps;C:\Users\USER\Downloads\pathfinder\target\debug;C:\Users\USER\.rustup\toolchains\stable-aarch64-pc-windows-msvc\lib\rustlib\aarch64-pc-windows-msvc\lib;C:\Program Files\Parallels\Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\USER\.cargo\bin;C:\Users\USER\AppData\Local\Microsoft\WindowsApps; |
I found the issue! Due to rust-lang/rustup#3703, Rustup no longer modifies the We can fix this by setting > set RUSTUP_WINDOWS_PATH_ADD_BIN=1
> rustup run nightly-2025-01-09 .\bevy_lint.exe Footnotes
|
I opened #281 to fix this issue. I also opened rust-lang/rustup#4196 to make |
Fixes #267! For more context, see [this comment](#267 (comment)): > I found the issue! Due to [rust-lang/rustup#3703](rust-lang/rustup#3703), Rustup no longer modifies the `PATH` on Windows because it prevented sub-invocations of `cargo` and `rustc` from going through their proxy. There was a [call for testing](https://internals.rust-lang.org/t/help-test-windows-behavior-between-rustup-and-cargo/20237) related to this, but it was announced before the linter was ever created. Because I don't use Windows frequently, I never caught the issue. > > We can fix this by setting `RUSTUP_WINDOWS_PATH_ADD_BIN=1`: > > ```cmd > > set RUSTUP_WINDOWS_PATH_ADD_BIN=1 > > rustup run nightly-2025-01-09 .\bevy_lint.exe > ```
I followed the installation guide on Windows, but running the linter throws an error:
I theorize that
rustup run
isn't setting up the path correctly, but it still needs further investigation.The text was updated successfully, but these errors were encountered: