Wire Swift compiler doesn't exclude `google.protobuf.*` properly
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 4.4k
- Forks
- 627
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 20
Description
When trying to generate swift protos, we were getting a bunch of extra google protos such as google.protobuf.EnumOption. We tried to exclude them with the following.
args = [
"--proto_path=$protoPath",
"--swift_out=$swiftOut",
"--includes=${includedTypes.join(",")}",
"--excludes=google.protobuf.*"
]
which did not take. We also tried to exclude them using a manifest file using the experimental manifest feature which also had no effect.
wellknowntypes:
roots:
- google.protobuf.Duration
prunes:
- google.protobuf.*
The root happened to be another google protobuf type, but that doesn't matter. This occurs with any root.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the shown Swift compiler arguments and experimental manifest, using a root such as google.protobuf.Duration. Trace the Wire Swift compiler's handling of --includes, --excludes, and manifest prunes. Done means google.protobuf.* types are excluded without removing the requested root type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, swift
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100