*`Project.RemoveDocuments`: Everything else in this type uses `IEnumerable<T>`, not `ImmutableArray<T>`. If we could start again from day 1 we might make everything that, but given that everything today uses the former, we should do so here. This applies to the overloads on `Solution` as well.
*`Solution.RemoveAdditonalDocuments/RemoveAnalyzerConfigDocuments`: We added these to `Solution`, but not to project, even though that also has the invididual `Remove` methods. We should add them to `Project` as well.
*`DocumentOptionSet.GetOption`: This API was added as a `new` on the concrete `DocumentOptionSet` to cover a change when we moved the implementation up to `OptionSet` and made the method non-virtual. This is not actually a breaking change, so we should remove this.
#### Source Generators:
As a general note, changes that we make here are _not_ considered breaking changes post 16.6.
However, we did take a broad overview of the API surface and have some notes for @chsienki.
*`GeneratorAttribute`: we should consider adding a `LanguageName` attribute to this type.
*`InitializationContext`: Rename to something like `SourceGeneratorInitialzationContext` or similar. Current name is ambiguous.
* Naming is inconsistent with existing `Action` ending for analyzer register methods.
*`SyntaxReceiverCreator`: all other `RegisterForXAction` methods in analyzers use an `Action` or `Func`, as appropriate. We should consider doing the same here.
*`ISyntaxReceiver`: This may be redundant with existing APIs.
*`SourceGeneratorContext`: There is not currently a way to share semantic models and other binding info between source generators. We should design a way for this info to be shared so we can avoid introducing lots of binding from generators.
@@ -250,7 +242,7 @@ int goo(int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8,
...
@@ -250,7 +242,7 @@ int goo(int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8,
// Hosting process exited with exit code ###.
// Hosting process exited with exit code ###.
varerrorOutput=ReadErrorOutputToEnd().Trim();
varerrorOutput=ReadErrorOutputToEnd().Trim();
Assert.Equal("Process is terminated due to StackOverflowException.\n"+string.Format(InteractiveHostResources.Hosting_process_exited_with_exit_code_0,process.ExitCode),errorOutput);
Assert.Equal("Process is terminated due to StackOverflowException.\n"+string.Format(InteractiveHostResources.Hosting_process_exited_with_exit_code_0,process!.ExitCode),errorOutput);
Execute(@"1+1");
Execute(@"1+1");
...
@@ -337,10 +329,10 @@ public void AsyncExecute_HangingForegroundThreads()
...
@@ -337,10 +329,10 @@ public void AsyncExecute_HangingForegroundThreads()
varprocess=_host.TryGetProcess();
varprocess=_host.TryGetProcess();
Assert.NotNull(process);
Assert.NotNull(process);
service.EmulateClientExit();
service!.EmulateClientExit();
// the process should terminate with exit code 0:
// the process should terminate with exit code 0:
process.WaitForExit();
process!.WaitForExit();
Assert.Equal(0,process.ExitCode);
Assert.Equal(0,process.ExitCode);
}
}
...
@@ -454,7 +446,7 @@ public void UserDefinedAssemblyResolve_InfiniteLoop()
...
@@ -454,7 +446,7 @@ public void UserDefinedAssemblyResolve_InfiniteLoop()