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

Generator shouldn't fail for unsuccessful compilation #52

Merged
merged 1 commit into from
Dec 13, 2022
Merged

Conversation

kzu
Copy link
Contributor

@kzu kzu commented Dec 13, 2022

In this scenario, the Compilation.IsSymbolAccessibleWithin is throwing at https://github.com/dotnet/roslyn/blob/9fef96ff1194f686993293c7971802216eb75a26/src/Compilers/Core/Portable/Compilation/Compilation.cs#L1626.

We account for that by providing our wrapping extension method that catches the exception and returns false instead (what we were expecting to get anyway).

Closes #51

In this scenario, the Compilation.IsSymbolAccessibleWithin is throwing at
https://github.com/dotnet/roslyn/blob/9fef96ff1194f686993293c7971802216eb75a26/src/Compilers/Core/Portable/Compilation/Compilation.cs#L1626.

We account for that by providing our wrapping extension method that catches the exception and returns false instead (what we were expecting to get anyway).

Closes #51
@kzu kzu enabled auto-merge (rebase) December 13, 2022 16:48
@kzu kzu merged commit ee17c10 into main Dec 13, 2022
@kzu kzu deleted the dev/nofail branch December 13, 2022 16:49
@kzu kzu added the bug Something isn't working label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If compilation isn't successful, incremental generator fails
1 participant