Skip to content
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

Fix (?) dependency tracking for the metavar span table #127218

Closed
petrochenkov opened this issue Jul 1, 2024 · 2 comments
Closed

Fix (?) dependency tracking for the metavar span table #127218

petrochenkov opened this issue Jul 1, 2024 · 2 comments
Labels
A-incr-comp Area: Incremental compilation A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-incr-comp Working group: Incremental compilation

Comments

@petrochenkov
Copy link
Contributor

metavar_spans is a piece of global data that lives in SessionGlobals, it is similar to hygiene data in the same SessionGlobals.

This table is populated during macro expansion and after that it doesn't change.
Data from the table can be read from any query that performs the span1.to(span2) operation.

This table is clearly a piece of untracked data.
We also cannot querify accesses to it by passing tcx to all span1.to(span2) operations.
I suspect the whole table should be hashed at some point after macro expansion so it becomes an initial input to the query system.

@petrochenkov petrochenkov added A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. WG-incr-comp Working group: Incremental compilation A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) labels Jul 1, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 1, 2024
@petrochenkov petrochenkov added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 1, 2024
@tgross35 tgross35 removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 19, 2024
@petrochenkov
Copy link
Contributor Author

This may be fixed in #134478.

@petrochenkov
Copy link
Contributor Author

Yep, fixed by #134478.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-incr-comp Working group: Incremental compilation
Projects
None yet
Development

No branches or pull requests

3 participants