bazelbuild / bazelbuild/rules_swift
Allow `_V2` protoc option
- Dominant language
- Starlark
- Stars
- 353
- Forks
- 172
- Avg merge
- 23h 22m
- Merged PRs (30d)
- 14
Description
I would like to be able to generate V2 protobuf code (https://github.com/grpc/grpc-swift/blob/f3380d217ebd7f5a939115736bcc19fe1752fee9/Plugins/GRPCSwiftPlugin/plugin.swift#L73). I was able to do it manually like the following:
```
protoc --swift_out=. \
--swift_opt=FileNaming=DropPath \
--grpc-swift_out=. \
--grpc-swift_opt=Client=true,Server=false,FileNaming=DropPath,_V2=true \
proto/my.proto
```
but it seems the rules_swift doesn't accept this option (https://github.com/bazelbuild/rules_swift/blob/86dc0f046269b3001f6f20cec38342c03120a209/proto/compilers/swift_proto_compiler_macros.bzl#L39).
would it be possible to add it?
Contributor guide
Research direction
Start in proto/compilers/swift_proto_compiler_macros.bzl at the referenced compiler options list and compare it with the manual protoc command in the issue. Confirm that rules_swift accepts _V2=true for grpc-swift generation; done means the option is accepted through the Bazel rule and V2 Swift protobuf code can be generated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100