Open LokiMidgard opened 10 months ago
Assigned to @chsienki to triage as area owner for source generator APIs. Please advise: do you champion this? any recommended milestone?
Thats funny I actually found myself wanting this exact method earlier this week for a personal project, so I'm happy to champion it going forwards. Seems like a nice little win, so should we aim for 17.9 timeframe?
Background and Motivation
When writing a source code generators and have two
IncrementalValuesProvider<T>
of the sameT
and need to merge them the only way today is to collect both to an list and combine those two lists, or do every transformation with both until they get collected, or registered with an output.The frist is easier, but less efficent, as changing one input, will result in reexecuting the whole pipeline for every element not only the changed. While the later bears the risk that a change in one pipeline is not carried over to the other. You can write a helper function, but that may scatter your code more then nessesary.
Proposed API
Usage Examples
Risks
I'm not aware of any specific risk. But adding more APIs increases the learning curve.