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

If compilation isn't successful, incremental generator fails #51

Closed
kzu opened this issue Dec 13, 2022 · 0 comments · Fixed by #52
Closed

If compilation isn't successful, incremental generator fails #51

kzu opened this issue Dec 13, 2022 · 0 comments · Fixed by #52
Labels
bug Something isn't working

Comments

@kzu
Copy link
Contributor

kzu commented Dec 13, 2022

Say you have code that doesn't fully compile. Generators are invoked nevertheless.

In this scenario, the Compilation.IsSymbolAccessibleWithin is throwing at
https://github.com/dotnet/roslyn/blob/9fef96ff1194f686993293c7971802216eb75a26/src/Compilers/Core/Portable/Compilation/Compilation.cs#L1626. I was expecting a false return value instead 🤷‍♂️, so we should account
for that.

@kzu kzu added the bug Something isn't working label Dec 13, 2022
kzu added a commit that referenced this issue 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
@kzu kzu closed this as completed in #52 Dec 13, 2022
kzu added a commit that referenced this issue 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
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 a pull request may close this issue.

1 participant