Open clehene opened 5 years ago
@sergei-ivanov while I'm at it, trying to figure things out, I'm thinking it may be helpful to post some comments here for reference. I'm currently trying to generate js output and grpc-web output. Note that there's no packaged grpc-web artifact we could use so I'm just using my local copy
<configuration>
<protoSourceRoot>../src/main/proto/v1alpha1</protoSourceRoot>
<pluginId>grpc-web</pluginId>
<pluginExecutable>
<!--TODO https://github.com/maven-download-plugin/maven-download-plugin-->
${user.home}/Downloads/protoc-gen-grpc-web-1.0.3-darwin-x86_64
</pluginExecutable>
<pluginParameter>import_style=commonjs+dts,mode=grpcweb</pluginParameter>
<javaScriptOptions>import_style=commonjs,binary</javaScriptOptions>
</configuration>
I trying get all files in the same dir to avoid moving them afterwards.
First thing I noticed is that I can't figure put how to set the compile-custom / plugin directory. The OutputDirectory
property is likely clashing and it if set it will be picked up and used for both compile-custom
and compile-X
and the second will delete the output of the first.
Given that protoc normally runs in a single phase, I wonder if we shouldn't emulate the same behavior and not have a separate compile-custom
?
You have two options:
I suggest that I release the plugin, so that you can test the latest changes. And we'll update the documentation in the next minor release.
@sergei-ivanov thank you. It's ok to release the plugin if it's ready, but if notI already build it locally so could test with that. I'm good either way. As a side note, I find myself occasionally going back to code to figure out if something is possible (in fact that prompted me to have these changes).
I wonder if intro and usage could be combiner to have an exhaustive documentation in a single document. That allows doing searches for keywords like "clear" in a single page rather than trying to figure out the links that may contain the info - just a thought.
Applicable Issues
Fixes #...
Description