You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't this crate's fault, but I've run into so many issues with different tools changing the PATH causing this crate to recompile. For example:
Open VSCode not via the terminal, compile a project.
Close vscode, open a terminal, run cargo check, this crate recompiles because the PATH is different than what was in vscode.
Run code ., open the built-in terminal, run cargo check... a recompile happens because some extension has injected to the PATH specifically for the terminal. Now rust-analyzer runs, recompiles because the vscode PATH is different than the terminal... then run cargo check in the terminal and recompile happens.
Any chance we could just add an exclusion for PATH here?
I think this is a good idea but I don't think ring's build script is the place to do it.
If you read build.rs you can see that we don't mention $PATH at all. I think it is cc-rs or Cargo itself that forces recompilation when $PATH or any environment variable changes.
I suggest that you write a cargo wrapper that normalizes the entire environment and configure your editor/IDE and other tooling to use this wrapper.
Huh, you're right and sorry for the bother! I wonder why CARGO_LOG=cargo::core::compiler::fingerprint=debug has been saying ring was causing the recompilation on PATH change (and I only have this issue when ring is a dependency). I'll look into it more when it happens again.
This isn't this crate's fault, but I've run into so many issues with different tools changing the PATH causing this crate to recompile. For example:
cargo check
, this crate recompiles because the PATH is different than what was in vscode.code .
, open the built-in terminal, runcargo check
... a recompile happens because some extension has injected to the PATH specifically for the terminal. Now rust-analyzer runs, recompiles because the vscode PATH is different than the terminal... then runcargo check
in the terminal and recompile happens.Any chance we could just add an exclusion for PATH here?
ring/build.rs
Line 38 in 4f09fa5
The text was updated successfully, but these errors were encountered: