-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
incr.comp.: Avoid creating an edge to DepNode::Krate when generating debuginfo namespaces. #38243
incr.comp.: Avoid creating an edge to DepNode::Krate when generating debuginfo namespaces. #38243
Conversation
// implementation reasons it is not possible to access this | ||
// information without introducing a dep-tracking edge to | ||
// DepNode::Krate, which essentially breaks incr. comp. | ||
(ccx.tcx().crate_name(def_id.krate).as_str(), DUMMY_SP) |
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.
Hmm. I guess you decided that doing the refactoring to break out the span
was too difficult? Seems like we could add a ccx.tcx().map.crate_span()
helper that just ignores the read-edge easily enough as well, no?
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.
The refactoring turned out to break many implicit assumptions that there is no real root module, especially around DefPaths and HIR map parent relationships. I could give it another try but I'd estimate that it would take me several days to get this right.
Do you have a suggestion where to point the edge alternatively? I'd rather not just ignore it.
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.
Well I would point it at DepNode::Hir(CRATE_DEF_ID)
, I think.
Note that DepNode::Krate and the Hir node for the crate def-id are distinct nodes.
…debuginfo namespaces.
9fc891c
to
271fb22
Compare
@bors r+ |
📌 Commit 271fb22 has been approved by |
Pushed a cleaner fix for this. Reading a the crate's span or attribute will now add an edge to |
… r=nikomatsakis incr.comp.: Avoid creating an edge to DepNode::Krate when generating debuginfo namespaces. r? @nikomatsakis Fixes #38222
r? @nikomatsakis
Fixes #38222