Repository navigation
Read property tracking into a model and render only when it changes - #3351
Merged
david-driscoll merged 1 commit intoNov 27, 2026
Conversation
PropertyTracking and GraphQL optional tracking built their text in the transform, which Roslyn runs for every candidate on every compilation, so every keystroke re-rendered every tracked type even though the output step was skipped. The transform now reads an equatable model (strings, flags and diagnostics, with the file frame as GeneratedFileFrame), and the output step renders it, which Roslyn skips when the model is unchanged. The declaring file's usings are kept as their text and laid out only when rendering. The output is byte-identical (raw output compared, CRLF included). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | -1 |
| Duplication | -2 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
david-driscoll
enabled stacked auto-merge
November 27, 2026 05:21
|
Test Results 33 files 33 suites 1h 59m 23s ⏱️ Results for commit 5cefde8. |
SummarySummary
CoverageRocket.Surgery.LaunchPad.Analyzers - 93.5%
Rocket.Surgery.LaunchPad.AspNetCore - 79.7%
Rocket.Surgery.LaunchPad.AspNetCore.Mvc - 86.1%
Rocket.Surgery.LaunchPad.EntityFramework - 100%
Rocket.Surgery.LaunchPad.Foundation - 85.1%
Rocket.Surgery.LaunchPad.Foundation.Tasks - 83.9%
Rocket.Surgery.LaunchPad.Grpc - 100%
Rocket.Surgery.LaunchPad.Hosting - 100%
Rocket.Surgery.LaunchPad.HotChocolate - 35.7%
Rocket.Surgery.LaunchPad.NodaTime - 98.1%
Rocket.Surgery.LaunchPad.NodaTime.HotChocolate - 100%
Rocket.Surgery.LaunchPad.NodaTime.StrawberryShake - 100%
Rocket.Surgery.LaunchPad.Primitives - 100%
Rocket.Surgery.LaunchPad.Primitives.Analyzers - 96.4%
Rocket.Surgery.LaunchPad.Spatial - 83%
Rocket.Surgery.LaunchPad.StrawberryShake - 100%
Rocket.Surgery.LaunchPad.StrawberryShake.Spatial - 44.8%
Rocket.Surgery.LaunchPad.ZeroAlloc.AspNetCore - 67.8%
Rocket.Surgery.LaunchPad.ZeroAlloc.Grpc - 100%
Rocket.Surgery.LaunchPad.ZeroAlloc.HotChocolate - 100%
Sample.BlazorServer - 21.5%
Sample.BlazorWasm - 18.6%
Sample.Classic.Restful - 8.4%
Sample.Command - 7.2%
Sample.Core - 63%
Sample.Graphql.Executable - 86.6%
Sample.Grpc - 85.5%
Sample.Minimal - 66.6%
Sample.Pages - 12%
Sample.Restful - 69.1%
Sample.Worker - 4.3%
|
github-merge-queue
Bot
removed this pull request from the merge queue because a pull request earlier in the stack was removed
Nov 27, 2026
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.
Summary
Stacked on #3348. This is follow-up 1 of #3347: read the property tracking generators into a model and render only when it changes.
PropertyTracking and GraphQL optional tracking built their text inside the syntax provider's transform. Roslyn runs that transform for every candidate declaration on every compilation, so each keystroke re-rendered every tracked type. #3347 already skipped the output step when the text was unchanged, but the rendering had already happened by then.
Now:
TrackingModelandOptionalsModelhold text, flags and diagnostics, compared by value.GeneratedFileFrameholds the declaring file's usings as written, the namespaces to add, the namespace and the enclosing-type lines. It reports LPAD0001 for an enclosing type that isn't partial, as before.The output is byte-identical. I compared the raw output, CRLF included, against the dump taken before #3348's conversion: the same 22 files and the same diagnostics. No snapshot changed.
Numbers
GeneratorBenchmarkTestsin Release over 40 types: best of 7 batches of 10 runs after warm-up. Allocations are stable; times are noisy.mainBreaking changes
None for users. Internally,
SourceWriter.OpenFiletakes aGeneratedFileFrameinstead of the usings, namespace symbol and declaration.Snapshot changes
None.
Verification
Analyzers.Tests: 1003/1003 pass.IncrementalCachingTests: an unrelated edit leaves the model stepCached/Unchangedand the source outputCached, and an input edit re-runs it.hk check --from-ref origin/mainis clean. The Release build passes.Follow-ups (not done here)
🤖 Generated with Claude Code