-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Make MetadataReferences a top level SG input #55130
Copy link
Copy link
Closed
Labels
Area-CompilersConcept-APIThis issue involves adding, removing, clarification, or modification of an API.This issue involves adding, removing, clarification, or modification of an API.Feature Requestapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implemented
Milestone
Metadata
Metadata
Assignees
Labels
Area-CompilersConcept-APIThis issue involves adding, removing, clarification, or modification of an API.This issue involves adding, removing, clarification, or modification of an API.Feature Requestapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implemented
Type
Fields
Give feedbackNo fields configured for issues without a type.
Background and Motivation
We have customers today (Razor) who use metadata references as an input to their pipeline. Today it is possible to get these from the compilation object, then use a custom comparer to decide if they have changed, but this is inefficient and requires code per-key press in the IDE, even though the compiler knows they havn't changed.
Proposed API
namespace Microsoft.CodeAnalysis { public readonly struct IncrementalGeneratorInitializationContext { + public IncrementalValuesProvider<MetadataReference> MetadataReferencesProvider => ... } }Usage Examples