Telegram.Bot icon indicating copy to clipboard operation
Telegram.Bot copied to clipboard

Looks like this source generator is completely non incremental

Open lsoft opened this issue 1 year ago • 3 comments

Looks like this generator (https://github.com/TelegramBots/Telegram.Bot/blob/843756aeb5cc8d8b94e30835d8c55ee5e98f2a7b/src/EnumSerializer.Generator/EnumConverterGenerator.cs#L24) is a part of widespread epidemic with incrementality failure.

You should never have any compilations or symbols in any steps of your incremental pipelines, and especially in output steps. Those objects are not equatable and not meant to be used this way.

Additional details can be found here https://github.com/zompinc/sync-method-generator/issues/20

lsoft avatar Jan 13 '24 15:01 lsoft

@lsoft In our case this is not such a big problem since our source generator is internal and is not used by the wide public. We also don't have much expertise on source generators and how to properly fix this issue. If you have the necessary knowledge and are willing to help I'll be very grateful

tuscen avatar Jan 13 '24 16:01 tuscen

@tuscen

If you have the necessary knowledge and are willing to help I'll be very grateful

unfortunate, I'm is in same position, my ISG suffers from this disease too 🫡

We also don't have much expertise on source generators and how to properly fix this issue.

this PR contains a solution which may be useful for us (or may be not). If you decide to fix this, you can TAL to that PR.

lsoft avatar Jan 13 '24 16:01 lsoft

@lsoft I'll try to look into that PR when I have free time. Thanks

tuscen avatar Jan 13 '24 16:01 tuscen