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
#228 always adds a [patch] section to Xargo's Cargo.tomls, but there is no way to override the crate it points to. It always uses the crate it find in rust-src, even if std or core itself is built using a path or git source. This leads to two different, incompatible, core crates in the dependency tree.
I've come up with 3 different approaches to fix this, not sure which one is best:
If there is a std crate in the blueprint, compute ../tools/rustc-std-workspace-core from that path (or use the same git) and use that as the [patch].
If there is a std crate in the blueprint, find the spec of the core dependency (how would this work if std is a git dependency?), then generate a rustc-std-workspace-core crate in the tempdir with that core. Then, use that temp crate as the [patch].
+1 for letting users specify their own patches. Because I have to patch compiler_builtins I moved away from xargo in bjorn3/rustc_codegen_cranelift@1e5c6bc.
I added support for specifying [patch] in #235, but I still think it's weird/annoying you have to use that facility when specifying a git/path dependency for std and friends.
#228 always adds a
[patch]
section to Xargo'sCargo.toml
s, but there is no way to override the crate it points to. It always uses the crate it find in rust-src, even ifstd
orcore
itself is built using a path or git source. This leads to two different, incompatible, core crates in the dependency tree.See #231 for more issues with git sources.
I've come up with 3 different approaches to fix this, not sure which one is best:
If there is a
std
crate in the blueprint, compute../tools/rustc-std-workspace-core
from that path (or use the same git) and use that as the[patch]
.If there is a
std
crate in the blueprint, find the spec of the core dependency (how would this work ifstd
is a git dependency?), then generate arustc-std-workspace-core
crate in the tempdir with that core. Then, use that temp crate as the[patch]
.Use the existing logic from Fix for latest nightly: need to add a patch section #228 to generate the
[patch]
by default. Let users specify their own[patch]
es inXargo.toml
The text was updated successfully, but these errors were encountered: