Incremental Generator Work Tracking API Implementation#55469
Merged
jkoritzinsky merged 23 commits intodotnet:mainfrom Dec 7, 2021
Merged
Incremental Generator Work Tracking API Implementation#55469jkoritzinsky merged 23 commits intodotnet:mainfrom
jkoritzinsky merged 23 commits intodotnet:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
8059b7c to
4891c50
Compare
Member
Author
f1da0a8 to
93292b6
Compare
bccf607 to
4fb1289
Compare
4fb1289 to
d1be32b
Compare
chsienki
reviewed
Sep 16, 2021
src/Compilers/Core/Portable/SourceGeneration/IncrementalContexts.cs
Outdated
Show resolved
Hide resolved
chsienki
reviewed
Sep 16, 2021
src/Compilers/Core/Portable/SourceGeneration/IncrementalGeneratorRunStep.cs
Outdated
Show resolved
Hide resolved
chsienki
reviewed
Sep 16, 2021
chsienki
reviewed
Sep 16, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/ValueSourceExtensions.cs
Outdated
Show resolved
Hide resolved
chsienki
reviewed
Sep 16, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/SourceOutputNode.cs
Outdated
Show resolved
Hide resolved
chsienki
reviewed
Sep 16, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs
Outdated
Show resolved
Hide resolved
chsienki
reviewed
Sep 16, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs
Outdated
Show resolved
Hide resolved
chsienki
reviewed
Sep 16, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs
Outdated
Show resolved
Hide resolved
chsienki
reviewed
Sep 16, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs
Outdated
Show resolved
Hide resolved
chsienki
reviewed
Sep 16, 2021
src/Compilers/Core/Portable/SourceGeneration/WellKnownGeneratorInputs.cs
Outdated
Show resolved
Hide resolved
cston
reviewed
Nov 29, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/SyntaxInputNode.cs
Outdated
Show resolved
Hide resolved
cston
reviewed
Nov 29, 2021
| _transformTable.RemoveEntries(); | ||
| _filterTable.TryRemoveEntries(TimeSpan.Zero, ImmutableArray<(IncrementalGeneratorRunStep, int)>.Empty, out ImmutableArray<SyntaxNode> removedNodes); | ||
|
|
||
| for (int i = 0; i < removedNodes.Length; i++) |
Contributor
Member
Author
There was a problem hiding this comment.
Yes, beforehand we did not accurately create enough "Removed" entries in the table, but since entries with the Removed state were ignored in later stages anyway (only kept in very specific scenarios), the bug was unnoticed.
cston
reviewed
Nov 30, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/SyntaxInputNode.cs
Outdated
Show resolved
Hide resolved
cston
reviewed
Nov 30, 2021
| public ISyntaxInputNode SyntaxInputNode { get => _owner; } | ||
|
|
||
| [MemberNotNullWhen(true, nameof(_inputSteps))] | ||
| private bool TrackIncrementalSteps => _nodeStateTable.TrackIncrementalSteps; |
Contributor
Member
Author
There was a problem hiding this comment.
We produce the value for _nodeStateTable in the constructor based partially on the trackIncrementalSteps parameter in the constructor.
cston
reviewed
Nov 30, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/SyntaxReceiverInputNode.cs
Show resolved
Hide resolved
cston
reviewed
Nov 30, 2021
src/Compilers/CSharp/Test/Semantic/SourceGeneration/GeneratorDriverTests.cs
Show resolved
Hide resolved
cston
reviewed
Nov 30, 2021
src/Compilers/CSharp/Test/Semantic/SourceGeneration/GeneratorDriverTests.cs
Show resolved
Hide resolved
cston
reviewed
Nov 30, 2021
src/Compilers/CSharp/Test/Semantic/SourceGeneration/GeneratorDriverTests.cs
Outdated
Show resolved
Hide resolved
…rator-work-tracking
Member
Author
Member
Author
|
@cston I've addressed your feedback and got CI on this PR back to green. Do you have any more feedback? |
cston
reviewed
Dec 6, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/IncrementalGeneratorNodeExtensions.cs
Outdated
Show resolved
Hide resolved
cston
reviewed
Dec 6, 2021
src/Compilers/Core/Portable/SourceGeneration/Nodes/NodeStateTable.cs
Outdated
Show resolved
Hide resolved
cston
approved these changes
Dec 6, 2021
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.
Implement incremental generator work tracking API proposed in #54832 and update incremental generator API tests to use it to validate incrementality.
Fixes #54832