-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Overview
Tracking issue for the code generation refactoring work planned in REFACTORING_PLANNING.md. The goal is to improve modularity, reduce duplication, and improve testability of the source generation code — making it easier to add new features, type support, etc.
After completing this work, adding a new type should require changes in ~4 sites (down from 8+).
Dependency graph
#39 (Snapshots) ───┐
├── #41 (Extract) ── #42 (DiagnosticCtx) ── #43 (Model) ─┬── #44 (Strategies) ── #45 (Parse/TryParse)
#40 (Benchmarks) ──┘ │
└── #46 (Move to Common)
Issues
Prerequisites (no dependencies, can be done in parallel)
- refactor: Add snapshot tests using Verify.SourceGenerators #39 — Add snapshot tests using Verify.SourceGenerators
- refactor: Add generated code performance benchmarks #40 — Add generated code performance benchmarks
Foundation (extract and clean up Parser)
- refactor: Extract Parser and Emitter to internal top-level classes #41 — Extract Parser and Emitter to internal top-level classes
- refactor: Introduce DiagnosticContext to replace Parser mutable state #42 — Introduce DiagnosticContext to replace Parser mutable state
Core refactoring (model and emission)
- refactor: Unify model layer and type resolution #43 — Unify model layer and type resolution
- refactor: Introduce per-type emission strategies #44 — Introduce per-type emission strategies
- refactor: Unify Parse/TryParse orchestration #45 — Unify Parse/TryParse orchestration
- refactor: Move unified type resolution to Analyzers.Common #46 — Move unified type resolution to Analyzers.Common
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels