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

Analyzer throws an exception with message 'Syntax node is not within syntax tree' #277

Open
rotanov opened this issue Jan 29, 2024 · 2 comments

Comments

@rotanov
Copy link

rotanov commented Jan 29, 2024

I have a .NET8 project, the analyzer throws an exception:

warning: AD0001: Analyzer 'ErrorProne.NET.StructAnalyzers.MakeStructMemberReadOnlyAnalyzer' threw an exception of type 'System.ArgumentException' with message 'Syntax node is not within syntax tree'.

I tried 0.4.0-beta.1 and 0.6.1-beta.1.

I understand that's not enough information to get to the cause. Is there any way to debug it locally?

@eludias
Copy link

eludias commented Feb 16, 2024

Same here.

Most .NET 8.0 projects are fine, except for the one which uses ref readonly parameters introduced in C#12, which give 'Syntax node is not within syntax tree'.

@Selmar
Copy link

Selmar commented Apr 7, 2024

Identical when using .NET Framework 4.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants