Wire shouldn't try to load both foo.proto and ././foo.proto
Open
Nobody has claimed this yet.
bug
- Dominant language
- Kotlin
- Stars
- 4.4k
- Forks
- 627
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 20
Description
I tried to switch to wire 2.0 and it's spewing errors. Maybe I'm just getting something wrong with the proto_path setting?
~/level/brotofuff/resources/proto $ java -jar ~/wire-compiler-2.0.0-jar-with-dependencies.jar --java_out=~/wiretmp --proto_path=. `find . -name '*.proto'`
yields a whole bunch of stuff like this:
./users.proto needs to import users.proto
for field error2 (././users.proto at 24:3)
in message com.levelmoney.proto.users.SendPasswordResetResponse (././users.proto at 17:1)
The proto in question looks like this:
message SendPasswordResetResponse {
enum SendPasswordResetError { ... }
optional common.Error error = 1;
optional common.Events events = 2;
optional SendPasswordResetError error2 = 3;
}
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 report with the shown Wire 2.0.0 command from the resources/proto directory, using --proto_path=. and the find-generated inputs. Start by tracing how users.proto and ././users.proto are resolved, then verify that the compiler no longer reports duplicate-path imports for the provided proto files.
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