-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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 to pass protoc command line arguments via a file or stdin #274
Comments
If you have a lot of .proto files, you don't have to invoke protoc on all of them in a single pass. Instead, you can invoke protoc once for each of them. |
I know, it is one of the workarounds that we either considered or already implemented. It may be less efficient, but it gets things done. I think the latest problem that one of the clients ran into was related to a large number of import paths ( |
We actually have this feature internally already. |
This is amazingly good news. I shall add support to the Maven plugin as soon as it is publicly available in protoc. |
Spread proto generation over multiple protoc calls on systems that limit command line length, e.g., Windows. Once the command length exceeds the OS limit, it calls with the current arguments and resets the builder. This is related to #167, allowing this issue to be avoided when many proto files are present, until protocolbuffers/protobuf#274 is completed.
I believe this is already implemented. |
I've just tested it with protoc 3.5.0, and it appears to work beautifully. Is 3.5.0 the earliest version where this feature has become publicly available? |
@sergei-ivanov Yes, 3.5.0 is the first version with this feature. |
Spread proto generation over multiple protoc calls on systems that limit command line length, e.g., Windows. Once the command length exceeds the OS limit, it calls with the current arguments and resets the builder. This is related to google#167, allowing this issue to be avoided when many proto files are present, until protocolbuffers/protobuf#274 is completed.
This has been a recurring source of pain on Windows for ages: in large projects with lots of
.proto
definitions or lots of.proto
imports it is pretty easy to reach the command line length limit on Windows, which is ridiculously small. We've developed a number of workarounds for this problem in the Maven plugin, but there are still reports that some projects are struggling.A simple solution that would have allowed us to solve that issue once and forever would be to pass a file with the actual command line arguments on the command line, or alternatively pipe them in.
The text was updated successfully, but these errors were encountered: