-
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
Bootstrap panics if a crate is overloaded to one outside the local tree #78617
Comments
This happens in |
I'm unable to reproduce this, can you provide more details on exactly what changes were made? Which version of FWIW, modifying a single |
The same happens for ykrustc when using It is worked around by having |
@bjorn3 I can't see those links for some reason. GitHub is saying "There isn’t anything to compare. We couldn’t figure out how to compare these references, do they point to valid commits?" For example, the following works for me on latest master (8e8939b): diff --git a/Cargo.toml b/Cargo.toml
index c27e5c469cf..f1430e2b1c9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -89,6 +89,8 @@ rustfmt-nightly = { path = "src/tools/rustfmt" }
# here
rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
+libc = {path="libc-0.2.79"}
+
# See comments in `library/rustc-std-workspace-core/README.md` for what's going on
# here
rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' } |
Github somehow removed the
Try moving |
I see, I forgot that "path deps are workspace members" does not work if it is outside of the workspace root. Regardless, it is still probably best in this particular case of BTW, those links still don't seem to work. I just see " This comparison is big! We’re only showing the most recent 250 commits", and a long list of commits. I posted with a fix at #78709. |
Seems like github doesn't switch to the "files changed" tab automatically. Anyway here is a copy: # When developing Yorick, you may find that you need to override ykpack. You
# can do it once here, instead of all over the place, by uncommenting the
# following two lines.
#[patch."https://github.com/softdevteam/yk"]
#ykpack = { path = "../yk/ykpack" } @@ -150,6 +150,10 @@ pub mod util;
#[cfg(windows)]
mod job;
+/// During development of Yorick, we override dependencies to local paths, and this confuses the
+/// bootstrapper into believing that our code is in-tree. It's not!
+const NOT_IN_TREE: [&str; 1] = ["ykpack"];
#[cfg(all(unix, not(target_os = "haiku")))]
mod job {
pub unsafe fn setup(build: &mut crate::Build) {
@@ -1105,6 +1109,9 @@ impl Build {
let mut list = vec![INTERNER.intern_str(root)];
let mut visited = HashSet::new();
while let Some(krate) = list.pop() {
+ if NOT_IN_TREE.contains(&&*krate) {
+ continue;
+ }
let krate = &self.crates[&krate];
ret.push(krate);
for dep in &krate.deps { |
Thanks @ehuss and @bjorn3 for tracking this down. This was just with the latest FWIW, I also tried with a |
This was triggered by overloading a crate in
std
'sCargo.toml
:Causing the following panic:
The text was updated successfully, but these errors were encountered: