Compile errors if a field is named 'com'
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 4.4k
- Forks
- 627
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 20
Description
The following proto file will not build using wire:
syntax="proto3";
message Simple {
int32 com = 1;
}
Fine if I wasn't so lazy and called my field centre_of_mass ;-)
Generates the follwing errors:
C:\prog\ToFVe\Android\AvaCloneApp\app\build\tmp\kapt3\stubs\debug\Simple.java:6: error: int cannot be dereferenced
@com.squareup.wire.WireField(tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = com.squareup.wire.WireField.Label.OMIT_IDENTITY)
C:\prog\ToFVe\Android\AvaCloneApp\app\build\tmp\kapt3\stubs\debug\Simple.java:6: error: an enum annotation value must be an enum constant
@com.squareup.wire.WireField(tag = 1, adapter = "com.squareup.wire.ProtoAdapter#INT32", label = com.squareup.wire.WireField.Label.OMIT_IDENTITY)
^
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
Reproduce the failure with the proto shown in the issue and inspect the generated kapt stubs at Simple.java, especially the annotation for the field named com. Trace that output through Wire’s code-generation entry point, then add a regression test showing that the generated source compiles for this field name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100