I created a second plugin that creates a binary file containing the raw request message. The generated files can then easily be loaded in unit tests.
The code is in ParserPlugin <https://github.com/HebiRobotics/QuickBuffers/blob/main/parser/src/main/java/us/hebi/quickbuf/parser/ParserPlugin.java#L73-L75>. The tests files generated as part of the build <https://github.com/HebiRobotics/QuickBuffers/blob/main/generator/pom.xml#L94-L100>. I hope that helps. On Thursday, February 2, 2023 at 7:40:04 PM UTC+1 Zachary Moore wrote: > Hello all, > > We are working on a custom java protoc plugin. > > We are invoking this via a gradle task that runs the generated binary with > protoc. > One of the issues that we are currently struggling with is what is the > best way to go about developing and debugging our plugin? Since we are > invoking this via a gradle task that calls protoc, the only way we have > thought to do this is via trying to hook into the java process once protoc > spins it up. > > One of the hacks we have done is sleeping the code long enough that allows > us to hook in but doing this, as well as lazy print statements is not > scaling. > > Wondering if there are any tips that can be shared here that anyone who > has worked on a custom java plugin before could share on development flows. > > Thanks all -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/c68be3d6-059a-4f7e-a389-ec9aaf56790an%40googlegroups.com.
