Update generator public API names:#47222
Merged
chsienki merged 8 commits intodotnet:masterfrom Aug 29, 2020
Merged
Conversation
- Rename SourceGeneratorContext -> GeneratorExecutionContext - Rename IntializationContext -> GeneratorIntializtionContext - Rename RunFullGeneration -> RunGeneratorsAndUpdateCompilation - Add 'Create' static methods to make unit testing easier - Update tests + documentation
Member
Author
|
@dotnet/roslyn-compiler for review. |
davidwengier
approved these changes
Aug 28, 2020
Member
davidwengier
left a comment
There was a problem hiding this comment.
I have some slides to update...
333fred
reviewed
Aug 28, 2020
| Microsoft.CodeAnalysis.GeneratorDriver.AddGenerators(System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISourceGenerator> generators) -> Microsoft.CodeAnalysis.GeneratorDriver | ||
| Microsoft.CodeAnalysis.GeneratorDriver.RemoveGenerators(System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISourceGenerator> generators) -> Microsoft.CodeAnalysis.GeneratorDriver | ||
| Microsoft.CodeAnalysis.GeneratorDriver.RunFullGeneration(Microsoft.CodeAnalysis.Compilation compilation, out Microsoft.CodeAnalysis.Compilation outputCompilation, out System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> diagnostics, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.GeneratorDriver | ||
| Microsoft.CodeAnalysis.GeneratorDriver.TryApplyEdits(Microsoft.CodeAnalysis.Compilation compilation, out Microsoft.CodeAnalysis.Compilation outputCompilation, out bool success, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.GeneratorDriver |
Member
There was a problem hiding this comment.
These should be *REMOVED* entries in Unshipped, which will then be updated when we mark the APIs as shipped.
Member
There was a problem hiding this comment.
The shipped file itself should not have these removed yet.
In reply to: 479529914 [](ancestors = 479529914)
333fred
reviewed
Aug 28, 2020
src/Compilers/Core/Portable/SourceGeneration/GeneratorContexts.cs
Outdated
Show resolved
Hide resolved
333fred
reviewed
Aug 28, 2020
src/Compilers/Core/Portable/SourceGeneration/GeneratorDriver.cs
Outdated
Show resolved
Hide resolved
- Make public ctor obsolete in prep for making it internal - Use .Create in test instead - Don't forward the old overload in GeneratorDriver - Make obsolete warnings errors
jaredpar
approved these changes
Aug 29, 2020
This was referenced Aug 29, 2020
Merged
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Aug 31, 2020
* upstream/master: (43 commits) Fix typos (dotnet#47264) Disable CS0660 where Full Solution Analysis produces a different result Pass in correct arguments to TypeScript handler Add skipped failing test for IDE0044 (dotnet#45288) Avoid first chance exception Code review feedback part 3 Update stale URLs in the readme Update IntegrationTestSourceGenerator.cs Fix comment Update IntegrationTestSourceGenerator.cs Remove unused reference to obsolete class Update nullable annotations in Classification folder Update generator public API names: (dotnet#47222) NullableContextAttribute for property parameters is from accessor (dotnet#47223) Modify global analyzer config precedence: (dotnet#45871) Skip the C# source generator integration test running for now Additional XAML LSP handlers (dotnet#47217) Remap diagnostics using IWorkspaceVenusSpanMappingService in-proc Warn on type named "record" (dotnet#47094) Bail out early before getting SyntaxTree ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: this is mostly a mechanical refactoring of names, but also keeps the original type names as empty types with
[Obsolete]attributes; this gives users a chance to see what the type was renamed to. We'll remove the obsolete types in the next preview (tracked by #46623)