Replies: 1 comment
-
There is an already open discussion about this in #48358 It's a very important feature for a wide spread of use cases. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As a creator of a source generator, I would like to have other generators "depend" on me. For example, my generator generates new file with a class A.cs, adds it as a source. Then I would like to invoke System.Text.Json's generator to generate serialization metadata for this newly generated A.cs file.
Invoking the other generator's Execute method from my generator does not seem to work. I assume because the files in the 1 generator are not yet compiled.
I don't see a clear path to re-compile the code and to get a new
GeneratorExecutionContext
, so that I can-invoke the second generator either.The only way I can see that could work is by co-operation of a user of the generators:
So then the input of generator two includes the output of generator1.
Are there any other suggestions?
Beta Was this translation helpful? Give feedback.
All reactions