-
-
Notifications
You must be signed in to change notification settings - Fork 95
fix: better incremental source generation #3305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Claude finished @thomhurst's task —— View job Code Review for PR #3305: fix: better incremental source generationReview Tasks:
Analysis Summary:This PR improves incremental source generation by removing unnecessary 🟢 Positive ChangesPerformance Improvements:
Code Quality:
🟡 Areas of ConcernNull Safety (TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs:193): if (testMethod?.MethodSymbol == null || testMethod.Context == null)
{
return;
}The null-conditional operator followed by null check is good, but consider using nullable reference types more consistently throughout. Repetitive Pattern: private static Compilation GetCompilation(TestMethodMetadata testMethod)
=> testMethod.Context!.Value.SemanticModel.Compilation;🟢 Security Assessment
🟡 Test Coverage ConsiderationsSnapshot Tests Required: According to CLAUDE.md guidelines, this change to the source generator requires running snapshot tests: dotnet test TUnit.Core.SourceGenerator.TestsIf snapshots differ, you should rename Incremental Build Testing: The changes specifically target incremental compilation performance. Consider adding tests that verify:
🟢 Performance BenefitsThis change aligns perfectly with TUnit's "Performance first" principle:
🔍 Recommended Actions
✅ Overall AssessmentThis is a well-executed performance optimization that:
Recommendation: APPROVE - This change provides clear performance benefits with minimal risk. Ensure snapshot tests are run and committed as per project guidelines. |
No description provided.