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

@bazel_tools//src/main/protobuf reference missing runtime #13404

Open
cpsauer opened this issue Apr 25, 2021 · 3 comments
Open

@bazel_tools//src/main/protobuf reference missing runtime #13404

cpsauer opened this issue Apr 25, 2021 · 3 comments
Labels
not stale Issues or PRs that are inactive but not considered stale P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request

Comments

@cpsauer
Copy link
Contributor

cpsauer commented Apr 25, 2021

Description of the problem:

Bazel commands like aquery output protobufs in formats described in @bazel_tools//src/main/protobuf. This would make building tooling on top of them amazingly easy...except that the py_proto_libraries specify runtimes and protoc's from //third_party/protobuf, which doesn't seem to be included in @bazel_tools. No fun! So then you can't use the bundled definitions, and end up copy pasting code, or parsing JSON, rather than taking the happy path Bazel (almost) built.

Either using normal protoc and runtime or bundling the runtime and protoc required by the tooling exposed would fix this issue.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Try referencing @bazel_tools//src/main/protobuf:analysis_v2_py_proto in a Bazel rule. It'll error out, complaining that the @bazel_tools//third_party/protobuf doesn't exist. Which, checking the filesystem, indeed does not.

Platform details

macOS 11, Bazel 4.0.0 -- the latest at the time of writing.

Related

#8738 discusses problems with the java versions of these rules--the only other way in though @bazel_tools. You used to be able to hack your way around this by having the grpc proto rules reference the raw proto_libraries, but the python protobuf runtime tightened up its checks enough to block the import-path hackery needed to make this work.

@philwo philwo added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request labels Apr 28, 2021
@philwo philwo removed the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Nov 29, 2021
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label May 25, 2023
@cpsauer
Copy link
Contributor Author

cpsauer commented May 27, 2023

@bazelbuild/triage, this issue is still relevant AFAIK.

(@bazelbuild/triage didn't seem to create a tag last I tried (no link) so I'm going to also tag @sgowroji and @Pavank1992 manually. Please coach me if you'd have preferred otherwise--and maybe update the bot's instructions)

@sgowroji sgowroji added not stale Issues or PRs that are inactive but not considered stale and removed stale Issues or PRs that are stale (no activity for 30 days) labels May 27, 2023
@sgowroji
Copy link
Member

sgowroji commented Jan 2, 2024

Hi @cpsauer, Thanks for Tagging. We marked it has not stale. So it wont be moving to stale workflow any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not stale Issues or PRs that are inactive but not considered stale P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request
Projects
None yet
Development

No branches or pull requests

3 participants