-
Notifications
You must be signed in to change notification settings - Fork 444
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
allow json output format to be modified #4407
Conversation
1aa930c
to
b87d3b6
Compare
Many of the tests are failing because dependencies can't be fixed:
What do we need to do to resolve this? Or is it just a case of wait for something on the source to update? |
@rst0git The opensuse repository is quite flaky and we run into this a lot in CI. Do you know a more stable repository we could migrate to? What is the process like? |
Sure, we can use Launchpad instead. I'll update the packages in Launchpad and open a pull request for the installation process in CI. |
Great, thank you! |
The Mac build in test suite fails as follows:
I'm going to change a class instance to a pointer to avoid this. But for my own education, how would I fix this if I wasn't going to switch to a pointer. (The pointer allows me to just write |
b87d3b6
to
88e0467
Compare
Honestly, I am not sure why this one is failing. It could be a CLang vs GCC issue. I enabled the sanitizer, which uses CLang instead of GCC to check that. |
88e0467
to
f35d887
Compare
I pushed a change that switches to a pointer instead. Don't entirely know if I like it (I need to create a JsonPrintOptions object in one of the constructors for P4Runtime). It's the most recent commit. BTW, if you want to test my PR without this change, feel free to temporary back out the last commit. |
Following up, I think that we need to add a
I'd prefer not to have to extend the set of sources that require the protobuf includes, unless we chose to include it for some large chunk of files (e.g., entire build, all frontend files, ...). The failure above came about by including options.h: I want to avoid the scenario where each time someone includes options.h they also need to go and update the list of files that need the protobuf includes. |
What confuses me is that this include should be exported by the controlplane dependency. I will try to take a look this week. |
Any opinion on whether it's better with or without the 3rd commit? |
I think it is better without. So far I am unable to reproduce this. I do not have a Mac. |
Here's what I had to change on a Mac to get it to build without the last commit:
|
bc20148
to
376b687
Compare
Expose JsonPrintOptions to allow JSON output format to be modified.
Move P4RuntimeFormat definition to a new header file to allow options.h to include only that header file, and not everything in p4RuntimeSerializer.h. This prevents needing to pull in the protobuf includes for any file that uses options.h
376b687
to
441b614
Compare
Expose JsonPrintOptions to allow JSON output format to be modified. Move P4RuntimeFormat definition to a new header file to allow options.h to include only that header file, and not everything in p4RuntimeSerializer.h. This prevents needing to pull in the protobuf includes for any file that uses options.h * MEV backport
Expose JsonPrintOptions to allow JSON output format to be modified.