v6: the "all" jar leaves com.google.rpc/api/type unrelocated but compiled against the shaded protobuf
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- grpc, java
- Bereich
- backend, build-system
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 34
- Forks
- 31
- Ø Merge
- 2 T. 10 Std.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus weaviate/java-client
-
Filter.toString() throws IllegalFormatConversionException for withinGeoRange filtersEvtl. vergeben @dudanogueira hat das vor 8 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
weaviate/java-client#638 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 62/100
weaviate/java-client#635 ·
-
v6: VersionSupport rejects every 2.x server (major and minor are concatenated)Evtl. vergeben @Ashlesha-17 hat das vor 8 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
weaviate/java-client#631 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
weaviate/java-client#630 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
weaviate/java-client#629 ·
Alle Issues in weaviate/java-client
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
linagora/twake-calendar-side-service#1578 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
tchiotludo/akhq#3438 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#266 ·
Maintainer antworten meist innerhalb von 1 Tag