The Problem
Traditional generator code loses diagnostics:The Solution
DiagnosticFlow<T> carries both value AND diagnostics through the pipeline:
Creating Flows
Chaining Operations
Then - Transform Value
Select - Map Without Flow
Where - Filter with Diagnostic
WarnIf - Conditional Warning
Combining Flows
Result Handling
Pipeline Integration
Use withIncrementalValuesProvider:
Properties
| Property | Description |
|---|---|
IsSuccess | True if no errors |
IsFailed | True if has errors |
HasErrors | True if any error-severity diagnostic |
Value | The wrapped value (throws if failed) |
Diagnostics | All accumulated diagnostics |
