v6: the "all" jar leaves com.google.rpc/api/type unrelocated but compiled against the shaded protobuf
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- grpc, java
- Domínio
- backend, build-system
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Java
- Estrelas
- 34
- Forks
- 31
- Merge médio
- 2d 10h
- PRs com merge (30d)
- 2
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de weaviate/java-client
-
Filter.toString() throws IllegalFormatConversionException for withinGeoRange filtersTalvez já em andamento @dudanogueira assumiu há 8 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
weaviate/java-client#638 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 62/100
weaviate/java-client#635 ·
-
v6: VersionSupport rejects every 2.x server (major and minor are concatenated)Talvez já em andamento @Ashlesha-17 assumiu há 8 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
weaviate/java-client#631 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
weaviate/java-client#630 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
weaviate/java-client#629 ·
Todas as issues de weaviate/java-client
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
linagora/twake-calendar-side-service#1578 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
tchiotludo/akhq#3438 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#266 ·
Mantenedores costumam responder em até 1 dia