You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling a large number of .proto files, the generated command exceeds the Default CMD character limit.
// Most OSs impose some kind of command length limit.// Rather than account for all cases, pick a reasonable default of 64K.staticfinalintDEFAULT_CMD_LENGTH_LIMIT=65536
To circumvent this, the generateCmds function splits the command into multiple smaller commands. However, each of these commands writes to the same output descriptor file via --descriptor_set_out, causing the last command to overwrite the previous ones.
Description
When compiling a large number of
.proto
files, the generated command exceeds the Default CMD character limit.To circumvent this, the
generateCmds
function splits the command into multiple smaller commands. However, each of these commands writes to the same output descriptor file via--descriptor_set_out
, causing the last command to overwrite the previous ones.Affected Code
GenerateProtoTask.groovy
(Lines 187-211)Expected Behavior
Each split command should write to a unique descriptor file and then merge them, preventing data loss.
Actual Behavior
Each generated command uses the same
--descriptor_set_out
parameter, leading to overwriting instead of appending.Steps to Reproduce
.proto
files that exceed the CMD character limit..proto
files.Proposed Fix
--descriptor_set_out
path for each split command.Would appreciate feedback or any alternative suggestions! 🚀
The text was updated successfully, but these errors were encountered: