v6: the "all" jar leaves com.google.rpc/api/type unrelocated but compiled against the shaded protobuf
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- grpc, java
- 领域
- backend, build-system
调研方向
Start by locating the build configuration that creates the all classifier jar and inspect its protobuf relocation rules. Reproduce the classpath conflict with the Java snippet and dependency versions in the issue, then trace which packaged classes remain under com.google.*. Done means the all jar no longer exposes those classes with bytecode linked to shaded protobuf, and the reproduction works with either classpath order.
由索引模型根据 Issue 内容生成。
描述
Summary
The all classifier jar relocates protobuf to io.weaviate.shaded.com.google.protobuf, but keeps com.google.rpc.*, com.google.api.*, com.google.type.* and com.google.longrunning.* (from proto-google-common-protos, about 940 classes) under their original package names, with their bytecode rewritten to extend the shaded protobuf.
Any application that also has proto-google-common-protos on its classpath ends up with two incompatible classes of the same name. That includes anything using gRPC's grpc-protobuf or a Google Cloud client library. Whichever jar comes first wins, and the other side breaks.
Reproduction (client6-6.3.2-all.jar, JDK 17)
Object s = com.google.rpc.Status.newBuilder().setCode(5).build();
System.out.println(s.getClass().getSuperclass().getName());
System.out.println(s instanceof com.google.protobuf.Message);
| Classpath order | superclass | instanceof Message |
|---|---|---|
client6-6.3.2-all.jar, proto-google-common-protos-2.62.0, protobuf-java-3.25.8 |
io.weaviate.shaded.com.google.protobuf.GeneratedMessageV3 |
false |
proto-google-common-protos-2.62.0, protobuf-java-3.25.8, client6-6.3.2-all.jar |
com.google.protobuf.GeneratedMessageV3 |
true |
The jar also carries unrelocated Guava, Gson, Nimbus JOSE/OAuth, Apache HttpClient 5 and commons-lang3, which can collide the same way in any application that has its own versions of them.
Expected
Relocate everything that is compiled against the shaded protobuf (at least com.google.rpc, com.google.api, com.google.type, com.google.longrunning), and ideally the other bundled libraries too. Otherwise the all jar is only safe in an application with no other Google/gRPC dependencies.
Related but separate: #422.
- 主要语言
- Java
- 星标
- 34
- 派生
- 31
- 平均合并
- 2 天 10 小时
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
weaviate/java-client 的其他 Issue
-
Filter.toString() throws IllegalFormatConversionException for withinGeoRange filters可能已有人在做 @dudanogueira 于 7 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
weaviate/java-client#638 ·
-
难度 1/5 1 小时以内 新手友好度 62/100
weaviate/java-client#635 ·
-
v6: VersionSupport rejects every 2.x server (major and minor are concatenated)可能已有人在做 @Ashlesha-17 于 8 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
weaviate/java-client#631 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
weaviate/java-client#630 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
weaviate/java-client#629 ·
查看 weaviate/java-client 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 63/100
linagora/twake-calendar-side-service#1578 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
tchiotludo/akhq#3438 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#266 ·
维护者通常 1 天内回复