Skip to content
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

binapigen not autogenerating memclnt #255

Open
mhawari opened this issue Dec 13, 2024 · 1 comment
Open

binapigen not autogenerating memclnt #255

mhawari opened this issue Dec 13, 2024 · 1 comment
Labels

Comments

@mhawari
Copy link

mhawari commented Dec 13, 2024

Description
When binapigen is called with specific a selected number of API files which does not contain memclnt but contains api files containing dump apis, it generates go files that have a dependency on memclnt even if it is not generated.

How to reproduce
Steps to reproduce the behavior:

  1. call binapigen on a file that containes a _dump API only
  2. try to compile the obtained go code
  3. compilation error because the memclnt package is not found

Expected Behavior
We would expect binapigen to automatically generate the memclnt package, as any other dependency (as it does for included types.api files)

@mhawari mhawari added the bug label Dec 13, 2024
@ondrej-fabry
Copy link
Member

ondrej-fabry commented Jan 14, 2025

Hey @mhawari, could you please provide more details about how you are using GoVPP to generate Go bindings? You mentioned binapigen, which is a Go package used by binapi-generator. Are you using it as a library or via CLI? It's recommended to use binapi-generator and point it to an entire VPP API directory containing .api.json files, selectively generating only the necessary files.

Could you also share the exact commands you’re running and their output? This will help me better understand and assist with the issue.

The memclnt plugin from VPP is a core component that includes ControlPing, commonly required in dump calls and RPC usage. If you wish to exclude it, you can use the --gen="" flag in binapi-generator. Otherwise, if you wish it to be included it HAS to be part of directory you use as input as GoVPP generator has no way to generate code for something it does not have definition for.

For more details, I recommend checking the documentation: Binary API Generator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants