Skip to content
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

protoc: argument list too long #120

Open
mohitkriplani1998 opened this issue May 16, 2022 · 4 comments
Open

protoc: argument list too long #120

mohitkriplani1998 opened this issue May 16, 2022 · 4 comments
Labels
help wanted Extra attention is needed P3 We're not considering to work on this, but happy to review a PR. (No assignee)

Comments

@mohitkriplani1998
Copy link

Building a rules_proto bazel rule results in below error:

Use --sandbox_debug to see verbose messages from the sandbox
2022/05/16 09:28:09 error running protoc: fork/exec bazel-out/k8-opt-exec-2B5CBBC6/bin/rules/proto/protoc: argument list too long

How to handle such errors?

@comius comius added the P3 We're not considering to work on this, but happy to review a PR. (No assignee) label May 20, 2022
@alexeagle
Copy link
Collaborator

We should "spill" the argv into a flagfile, but it requires protoc to support that. Internally, Google handles this by modifying the kernel to allow a tremendous amount of data in argv.

@alexeagle alexeagle added the help wanted Extra attention is needed label Sep 26, 2023
@comius
Copy link
Collaborator

comius commented Sep 26, 2023

This was most likely fixed by changes in proto_common not to add -I flag for each proto file transitively. Now the amount of flags passed to protoc is pretty small. And we even got about 5% wall time back.

@comius
Copy link
Collaborator

comius commented Sep 26, 2023

This is the change: bazelbuild/bazel@699f3e8

@comius
Copy link
Collaborator

comius commented Sep 26, 2023

Also, we're already using params files for invoking protoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed P3 We're not considering to work on this, but happy to review a PR. (No assignee)
Projects
None yet
Development

No branches or pull requests

3 participants