-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move plugins to own package & improve apigen CLI #29
Conversation
fe96cac
to
1461e33
Compare
This patch adds a GetRetVal function on all reply messages, that retreives the error value VPP returns in its Reply. If the field is not present or the value is 0 (success) it returns nil. This also changes the types enum to xxxType names e.g. api.RequestMessage becomes api.RequestMessageType Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: I55ca4d02b19909a3fd44c152962b934621646e9f
This patch moves the binapigenerator plugins to their own package. - It capitalizes the methods they leverage. - It changes the way plugins are called, passing the whole generator at once and letting the plugin themselves loop on the files. This allow for more variety in filtering, aggregation, etc... This patch also proposes an evolution to the binapigen CLI in order to make it more user-friendly for newcomers as well as build pipelines based on go:generate For now two usecases are in the picture: - Building from a directory containing .json files e.g. 'binapigen --api /usr/share/vpp/api --output ./myapp/bindings --filter interface,ip' - Building from a cloned local VPP e.g. 'binapigen --vpp ~/vpp --output ./myapp/binding' Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: I5b0b2ade40ab80c9e91c2a422f8c193b232d9830
1461e33
to
62f5161
Compare
Why including quite unrelated changes into here? It would be good to keep this PR only about separating the plugins - making the generator extendable. The changes to the API are not needed for this. |
I think both. Basically I think a change like this should be done in multiple steps. This helps with doing reviews, bisecting possible issues and makes the changes testable separately. Overall, I do not see how these changes relate together in GoVPP and I believe these considerations must have priority over dependency/requirements of other projects. |
Ok, so I did split this patch & the previous one, we have (in order)
All these patches are on top of each other (it's way easier due to dependencies between each of them), so looking at a PR will include changes in the previous ones until merged & rebased |
This patch moves the binapigenerator plugins to their own package.
at once and letting the plugin themselves loop on the files.
This allow for more variety in filtering, aggregation, etc...
This patch also proposes an evolution to the binapigen CLI
in order to make it more user-friendly for newcomers as well
as build pipelines based on go:generate
For now two usecases are in the picture:
e.g. 'binapigen --api /usr/share/vpp/api --output ./myapp/bindings --filter interface,ip'
e.g. 'binapigen --vpp ~/vpp --output ./myapp/binding'
Signed-off-by: Nathan Skrzypczak nathan.skrzypczak@gmail.com
Change-Id: I5b0b2ade40ab80c9e91c2a422f8c193b232d9830