-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[experiment] inject compiler builtins #136234
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
Conversation
Introduce an enum that represents the different possible sources for dependencies, and use them where possible. This will enable more fine grained control and provides better context than passing the `dep_root` tuple.
This comment has been minimized.
This comment has been minimized.
let dep_kind = if attr::contains_name(&item.attrs, sym::no_link) { | ||
CrateDepKind::MacrosOnly | ||
} else { | ||
CrateDepKind::Explicit | ||
}; | ||
|
||
if name == sym::compiler_builtins { | ||
info!("BUILTINS DETECTED dep_kind {dep_kind:?}"); | ||
return None; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you ignoring explicit extern crate compiler_builtins;
? I think this is the reason of the CI failure as the implicitly injected compiler_builtins dependency isn't checked for stability, yet explicit mentions should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's dumb. I did this as a more minimal step than removing it from standard_library_imports
for experimentation, but you're right that this would catch the explicit extern as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that was it. I updated #136226 with the changes here, so will close this one.
The change between 0.1.143 and 0.1.144 includes refactoring that was in compiler-builtins before, but had to be reverted before landing in rust-lang/rust because the traits were leaking into diagnostics [1]. Recently a fix for this issue was merged [2] so the cleanup is reapplied here. This also acts as a regression test for [2]. [1]: rust-lang#128691 (comment) [2]: rust-lang#135278
r? @ghost