Closed
Description
So far this is not a problem, as there is only one plugin built in to protoc-gen-go. However when more than one plugin is registered the generator may behave unexpectedly.
This is caused by two issues:
RegisterPlugin
is called frominit()
and the execution sequence is not guaranteed (though it's possible to manually control the import sequence and hope go doesn't change it's behavior on handling import packages).- Registered plugins are filtered against the list of plugin to use from user input at runtime. Meaning, the order of plugins to use doesn't affect the final output -- it will always be unpredictable. What makes things worse is that, unknown plugin will be ignored silently.
I think the second place is the best place to fix this issue.
Metadata
Metadata
Assignees
Labels
No labels