Skip to content
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

Add DiagnosticOr<T> type for gracefully handling failures in incremental generator transformations #86603

Merged
merged 21 commits into from
May 25, 2023

Conversation

jtschuster
Copy link
Member

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.

@ghost
Copy link

ghost commented May 22, 2023

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Issue Details

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.

Author: jtschuster
Assignees: -
Labels:

area-System.Runtime.InteropServices

Milestone: -

@jtschuster jtschuster marked this pull request as ready for review May 24, 2023 18:46
@jtschuster
Copy link
Member Author

Test failures are known

@jtschuster jtschuster merged commit ceb1d86 into dotnet:main May 25, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants