-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Bug]: [Windows] The filename or extension is too long #481
Comments
Thanks. My guess is that the error message is being misleading and the issue is the argline size. If this is the case, there is a feature in protoc that allows moving these flags to a file instead. I should be able to just swap that out and it should hopefully fix the issue for you. Will try and find time this weekend. |
Reproduced this in CI...
Will get a fix out ASAP. |
This change implements the argument file mechanism for protoc command line flags, like we do already for Java invocations. This helps avoid build failures on Windows when a large number of files are being generated, since Windows has somewhat esoteric limits on the command line length. Offloading this to a file works around this constraint.
Releasing 2.7.2 with this fix. |
@ascopes , thank you very much for the fast fix. I can confirm it works! |
Brief description
Windows supports only 8191 characters in the command line. It's a known issue. Usually, a plugin that executes some command line codes supports a way to
shorten
it, for example, using a MANIFEST fileSteps to reproduce
There is no simple way to reproduce it, my project has a lot of protos, including grpc services
[INFO] Generating source code from 440 source files (discovered within 1 source root, from a total of 440 candidate source files)
and the actual command line generated by the plugin is huge
basically it has all proto files specified here, probably they are all related, I don't own those files, so can't control them
Error message
Logs
No response
Operating system
Windows 10 22H2
JDK version
21
Maven version
3.9.9
Plugin version
2.7.1
Protoc version
4.29.0
Additional details
No response
Would you like to contribute a bugfix?
The text was updated successfully, but these errors were encountered: