Replies: 2 comments 1 reply
-
This is just WIP? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@macon Why do you want them in the initialize step? The model here is Initialize() you are just specifying how your generator works and it only runs once; all the actual work happens in Execute. But I can imagine you have some case where you could optimize your syntax walk if you had already processed the additional files first? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to augment the protobuf/C# codegen. I want to pass a set of
AdditionalFiles
(pointing at my .protos) to my source generator and scan these to set up some SyntaxReceivers. Unfortunately I need to set up the SyntaxReceiver in theInitialize
method of the source generator and at this point the AdditionalFiles are not available to me. The AdditionalFiles is only available in theGeneratorExecutionContext
parameter of theExecute
method.It seems right to have all the config information that the consuming project is giving to the generator (e.g. AdditionalFiles) available at the Initialize step.
Beta Was this translation helpful? Give feedback.
All reactions