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

Remove direct uses of :protoc binary #1203

Open
keith opened this issue May 14, 2024 · 3 comments
Open

Remove direct uses of :protoc binary #1203

keith opened this issue May 14, 2024 · 3 comments

Comments

@keith
Copy link
Member

keith commented May 14, 2024

bazelbuild/rules_proto#213

@adincebic
Copy link
Contributor

Hey @keith I am interested in working on this. However I need some guidance since it seems to me that we have much more complicated setup than rules_python and rules_ts. So if you could provide a rough outline what files should I take a look at, that would be nice. I saw that we have protoc_wrapper package which contains direct references to @com_google_protobuf//:protoc. Besides that there is proto package as well.

@keith
Copy link
Member Author

keith commented May 24, 2024

cc @AttilaTheFun who might be able to help here too

I think we need to keep our universal_protoc rule to support shared caches across x86_64 and arm64, so I guess the ideal would be to eliminate that target in the other codepath. and base which binary we use based on the //swift:universal_tools_config flag.

@AttilaTheFun
Copy link
Contributor

@keith @adincebic the new swift_proto_library rules I implemented are fully customizable in terms of the protoc binary and protoc plugins. I needed this capability to use the SwiftProtobuf and grpc-swift dependencies from rules_swift_package_manager instead.

(In fact, you can actually use an entirely custom swift proto compiler like Square's Wire which is not protoc based.)

The new rules were merged into rules_swift 1.X and the old rules were marked as deprecated, and in rules_swift 2.X the old rules were deleted.

You're welcome to replace the default protoc and plugin binaries in the repository.

cc @brentleyjones @luispadron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants