-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
metadata: Span data and SourceFiles for macro-only dependencies can be inlined #74731
Copy link
Copy link
Open
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-metadataArea: Crate metadataArea: Crate metadataC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-metadataArea: Crate metadataArea: Crate metadataC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Some crates are only used for their macros (which are only expanded, but not reexported), but are still required to be loaded (for their spans) when loading non-macro library crates that were produced using those macros.
(It doesn't matter whether the macros are declarative or procedural.)
#73706 implemented a way to inline span data from such macro crates into library crates.
As a result #69432 can be reverted now and span data from macro-only dependencies can be inlined on as-needed basis.
The usual downside is that the same data can be inlined into multiple libraries and duplicated, instead of existing as a separate crate that is shared, however #73706 showed that such inlining is a cumulative improvement and can also be useful for other purposes (#73047).
cc @Aaron1011