未验证 提交 8c87ee2d 编写于 作者: C Chris Sienkiewicz 提交者: GitHub

Convert a couple of PROTOTYPE comments that crept in via source generators (#44165)

上级 998ef91d
......@@ -44,7 +44,7 @@ CompilationOptions ICompilationFactoryService.GetDefaultCompilationOptions()
GeneratorDriver? ICompilationFactoryService.CreateGeneratorDriver(ParseOptions parseOptions, ImmutableArray<ISourceGenerator> generators, ImmutableArray<AdditionalText> additionalTexts)
{
// PROTOTYPE: for now we gate behind langver == preview. We'll remove this before final shipping, as the feature is langver agnostic
// https://github.com/dotnet/roslyn/issues/42565: for now we gate behind langver == preview. We'll remove this before final shipping, as the feature is langver agnostic
if (((CSharpParseOptions)parseOptions).LanguageVersion != LanguageVersion.Preview)
{
return null;
......
......@@ -168,7 +168,7 @@ public override TrackedGeneratorDriver TransformGeneratorDriver(TrackedGenerator
internal sealed class AddAdditionalDocumentsAction : CompilationAndGeneratorDriverTranslationAction
{
#pragma warning disable IDE0052 // Remove unread private members
// PROTOTYPE: right now there is no way to tell a GeneratorDriver that an additional file has been added
// https://github.com/dotnet/roslyn/issues/44161: right now there is no way to tell a GeneratorDriver that an additional file has been added
private readonly ImmutableArray<TextDocumentState> _additionalDocuments;
#pragma warning restore IDE0052 // Remove unread private members
......@@ -179,7 +179,7 @@ public AddAdditionalDocumentsAction(ImmutableArray<TextDocumentState> additional
public override TrackedGeneratorDriver TransformGeneratorDriver(TrackedGeneratorDriver generatorDriver)
{
// PROTOTYPE: right now there is no way to tell a GeneratorDriver that an additional file has been added
// https://github.com/dotnet/roslyn/issues/44161: right now there is no way to tell a GeneratorDriver that an additional file has been added
// to allow for incremental updates: our only option is to recreate the generator driver from scratch.
// return generatorDriver.WithPendingEdits(_additionalDocuments.SelectAsArray(a => (PendingEdit)new AdditionalFileAddedEdit(new AdditionalTextWithState(a))));
return new TrackedGeneratorDriver(generatorDriver: null);
......@@ -189,7 +189,7 @@ public override TrackedGeneratorDriver TransformGeneratorDriver(TrackedGenerator
internal sealed class RemoveAdditionalDocumentsAction : CompilationAndGeneratorDriverTranslationAction
{
#pragma warning disable IDE0052 // Remove unread private members
// PROTOTYPE: right now there is no way to tell a GeneratorDriver that an additional file has been added
// https://github.com/dotnet/roslyn/issues/44161: right now there is no way to tell a GeneratorDriver that an additional file has been added
private readonly ImmutableArray<TextDocumentState> _additionalDocuments;
#pragma warning restore IDE0052 // Remove unread private members
......@@ -200,7 +200,7 @@ public RemoveAdditionalDocumentsAction(ImmutableArray<TextDocumentState> additio
public override TrackedGeneratorDriver TransformGeneratorDriver(TrackedGeneratorDriver generatorDriver)
{
// PROTOTYPE: right now there is no way to tell a GeneratorDriver that an additional file has been removed
// https://github.com/dotnet/roslyn/issues/44161: right now there is no way to tell a GeneratorDriver that an additional file has been removed
// to allow for incremental updates: our only option is to recreate the generator driver from scratch.
// return generatorDriver.WithPendingEdits(_additionalDocuments.SelectAsArray(a => (PendingEdit)new AdditionalFileRemovedEdit(...)));
return new TrackedGeneratorDriver(generatorDriver: null);
......
......@@ -709,7 +709,7 @@ public CompilationInfo(Compilation compilation, bool hasSuccessfullyLoaded)
if (generatorDriver.GeneratorDriver != null)
{
// PROTOTYPE: make an API to expose these diagnostics
// https://github.com/dotnet/roslyn/issues/44163: make an API to expose these diagnostics
generatorDriver = new TrackedGeneratorDriver(generatorDriver.GeneratorDriver.RunFullGeneration(compilation, out compilation, out var diagnostics, cancellationToken));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册