Implement metadata reference provider#55052
Conversation
|
@333fred Was planning to just bring it by itself. Do we need an issue to track, or can we just use this PR? |
Let's do a separate issue, that way the notes will have an issue to link to. |
|
@dotnet/roslyn-compiler for review, now API review is approved. |
333fred
left a comment
There was a problem hiding this comment.
One small bit of test feedback.
src/Compilers/CSharp/Test/Semantic/SourceGeneration/GeneratorDriverTests.cs
Outdated
Show resolved
Hide resolved
|
Ping @dotnet/roslyn-compiler for review please :) |
|
|
||
| public static readonly InputNode<AnalyzerConfigOptionsProvider> AnalyzerConfigOptions = new InputNode<AnalyzerConfigOptionsProvider>(b => ImmutableArray.Create(b.DriverState.OptionsProvider)); | ||
|
|
||
| public static readonly InputNode<MetadataReference> MetadataReferences = new InputNode<MetadataReference>(b => b.Compilation.References.AsImmutable()); |
There was a problem hiding this comment.
As a bit of an aside Im' surprised this already isn't an ImmutableArray. The implementation is an iterator and we use it several times during compilation.
There was a problem hiding this comment.
I updated it to use ExternalReferences which is immutable, as we aren't running source generators in an interactive context.
src/Compilers/CSharp/Test/Semantic/SourceGeneration/GeneratorDriverTests.cs
Show resolved
Hide resolved
|
@RikkiGibson PTAL |
|
@333fred can you take a look at this API change? Would be nice to have for P5 |
Implements a provider for metadata references. Addresses part of #54272
API Review: #55130
closes #55130