Skip to content

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

Closed
@petrochenkov

Description

@petrochenkov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-incr-compWorking group: Incremental compilation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions