-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add DiagnosticOr<T> type for gracefully handling failures in incremental generator transformations
#86603
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
…ratorStringMarshalling
…conditional access
…arshallingMatchBase
…arshallingMatchBase
…arshallingMatchBase
|
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsBuilds off of #86467, so wait until that is finished to review the diff. Adds the DiagnosticOr type that represents either the expected return value, or a diagnostic of why the transformation failed. This replaces the Tuple of (T?, Diagnostic?) that was previously used. Adds a few extension methods on IncrementalValuesProvider and IncrementalGeneratorInitializationContext to make reporting diagnostics and filtering out diagnostics from values.
|
...raries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs
Show resolved
Hide resolved
...raries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs
Outdated
Show resolved
Hide resolved
...raries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs
Outdated
Show resolved
Hide resolved
...raries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs
Outdated
Show resolved
Hide resolved
|
Test failures are known |
Builds off of #86467, so wait until that is finished to review the diff.
Adds the DiagnosticOr type that represents either the expected return value, or a diagnostic of why the transformation failed. This replaces the Tuple of (T?, Diagnostic?) that was previously used.
Adds a few extension methods on IncrementalValuesProvider and IncrementalGeneratorInitializationContext to make reporting diagnostics and filtering out diagnostics from values.