You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source generation is completely non incremental due to rooting of compilation objects. There should not be *Syntax or symbol instances in the compilation pipeline, as they completely break the caching and increase memory usage. It's important to establish a value type data model of the things required for generating the source, see more here.
The source generation is completely non incremental due to rooting of compilation objects. There should not be
*Syntax
or symbol instances in the compilation pipeline, as they completely break the caching and increase memory usage. It's important to establish a value type data model of the things required for generating the source, see more here.ConsoleAppFramework/src/ConsoleAppFramework/ConsoleAppGenerator.cs
Line 39 in 48d550c
and
ConsoleAppFramework/src/ConsoleAppFramework/ConsoleAppGenerator.cs
Lines 63 to 66 in 48d550c
Many libraries fall into this pit of failure. See similar issues in many other libraries that used
IIncrementalGenerator
in correctly:ApplicationConfigurationGenerator
incremantality is broken dotnet/winforms#8386and many many more.
Related Roslyn issues:
Here's solid article from Andrew Lock about the issues: https://andrewlock.net/creating-a-source-generator-part-9-avoiding-performance-pitfalls-in-incremental-generators/
You can see here how one library fixed their incremental generator: k94ll13nn3/AutoConstructor#83
It is also possible to add tests to test whether a pipeline is incremental:
The text was updated successfully, but these errors were encountered: