TelegramBots / Telegram.Bot

.NET Client for Telegram Bot API
https://telegrambots.github.io/book
MIT License
3.22k stars 692 forks source link

Looks like this source generator is completely non incremental #1345

Closed lsoft closed 18 hours ago

lsoft commented 10 months ago

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

tuscen commented 10 months ago

@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

lsoft commented 10 months ago

@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.

tuscen commented 10 months ago

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

wiz0u commented 18 hours ago

EnumSerializer.Generator was removed