v6: the "all" jar leaves com.google.rpc/api/type unrelocated but compiled against the shaded protobuf
まだ誰も着手していません。
評価
- 難易度
- 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時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信