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

Refactor CloneableGenerator #536

Open
sven-n opened this issue Nov 24, 2024 · 0 comments
Open

Refactor CloneableGenerator #536

sven-n opened this issue Nov 24, 2024 · 0 comments

Comments

@sven-n
Copy link
Member

sven-n commented Nov 24, 2024

When updating the nuget for Microsoft.CodeAnalysis.Analyzers, we're getting build errors for the CloneableGenerator:

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error (active)	RS1035	The symbol 'GeneratorExecutionContext' is banned for use by analyzers: Non-incremental source generators should not be used, implement IIncrementalGenerator instead	MUnique.OpenMU.SourceGenerators	C:\Users\Sven\Documents\GitHub\OpenMU_2\src\SourceGenerators\CloneableGenerator.cs	37		
Error (active)	RS1035	The symbol 'GeneratorExecutionContext' is banned for use by analyzers: Non-incremental source generators should not be used, implement IIncrementalGenerator instead	MUnique.OpenMU.SourceGenerators	C:\Users\Sven\Documents\GitHub\OpenMU_2\src\SourceGenerators\CloneableGenerator.cs	35		
Error (active)	RS1035	The symbol 'GeneratorExecutionContext' is banned for use by analyzers: Non-incremental source generators should not be used, implement IIncrementalGenerator instead	MUnique.OpenMU.SourceGenerators	C:\Users\Sven\Documents\GitHub\OpenMU_2\src\SourceGenerators\CloneableGenerator.cs	48		
Error (active)	RS1035	The symbol 'GeneratorExecutionContext' is banned for use by analyzers: Non-incremental source generators should not be used, implement IIncrementalGenerator instead	MUnique.OpenMU.SourceGenerators	C:\Users\Sven\Documents\GitHub\OpenMU_2\src\SourceGenerators\CloneableGenerator.cs	77		

We'd have to update the generator to implement IIncrementalGenerator to be able to upgrade the nuget package. The new API seems to have some performance improvements, according to https://andrewlock.net/creating-a-source-generator-part-1-creating-an-incremental-source-generator/#background-source-generators

@sven-n sven-n added question and removed question labels Nov 24, 2024
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

1 participant