-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
x.py rebuilds "bootstrap" a lot #94408
Comments
We could probably move that into this if: Lines 13 to 21 in 10cc7a6
I think that would still be fine and maybe enough to avoid trouble in practice? That if is the reason we added it in the first place. |
|
RUSTC is likely set for you -- this is a build script environment, where it should be set to something. IIRC, I had some trouble assuming it was an absolute path in all cases which is why this ad-hoc canonicalization logic was added. |
rust/src/bootstrap/bootstrap.py Line 1001 in 10cc7a6
|
avoid rebuilding bootstrap when PATH changes Fixes rust-lang#94408 r? `@Mark-Simulacrum`
avoid rebuilding bootstrap when PATH changes Fixes rust-lang#94408 r? ``@Mark-Simulacrum``
The fix in #94409 seems wrong to me - if bootstrap isn't rerun when |
I'm not sure I follow your logic -- bootstrap is still rerun when RUSTC changes, just not when it is a relative path. My assumption (perhaps wrong, happy to be corrected) there is that a relative path is only encountered when we're being invoked with a more global rustc (e.g., /usr/bin/rustc, which is in PATH normally). |
Nothing changed about rebuilds when Put differently: we still emit |
ah, I missed that only Probably you can rerun even less, right, only when it's a lookup ( |
It checks for |
When
x.py
is invoked both by vscode and from the terminal directly, "bootstrap" is rebuilt each time. I think in the end this is due to that line:rust/src/bootstrap/build.rs
Line 7 in 10cc7a6
Indeed
PATH
is almost certainly different between the two environments. (vscode lives inside a sandbox, it just runs too many untrusted things to be granted access to my files and keys.)Rebuilding on every
PATH
change seems excessive, is that truly needed?Cc @jyn514 @Mark-Simulacrum
The text was updated successfully, but these errors were encountered: