salesforce / grpc-java-contrib

Useful extensions for the grpc-java library
BSD 3-Clause "New" or "Revised" License
220 stars 34 forks source link

Jprotoc: can't change output directory when using ProtocPlugin.debug() #140

Closed sumio closed 3 years ago

sumio commented 4 years ago

Files generated by ProtocPlugin.debug() based on CodeGeneratorResponse always resides in current working directory. Would you add new debug() having 4 parameters to specify the directory of the generated files?

public static void debug(
            @Nonnull List<Generator> generators,
            List<GeneratedExtension> extensions,
            @Nonnull String dumpPath,
            String outputDir) { ... }

It would be useful in case of calling debug() and verifying file output in test code.

rmichela commented 3 years ago

I added a proper unit testing workflow in 1.2.0.