GoogleCloudPlatform / GoogleCloudPlatform/cloud-opensource-java

JLBP and Vendoring

Abierto
#1,136 1 comentario 0 reacciones 0 asignados Ver en GitHub
best practices p2
Lenguaje dominante
Java
Estrellas
163
Forks
80
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

JLBP-18 only discusses shading. Consider what, if anything, to say about "vendoring" as used by the Beam project. Per Aaron Dixon on the beam developer list:

> With SHADING you have your project (e.g., Beam) depend directly on Guava and its public package names. Your build will then compile and link to these package names and only after-the-fact [1] rewrite the byte-code to rename the guava package. This entails both byte-code rewriting the Guava class files (to rename the packages of the Guava code itself) and byte-code rewriting all of your project class files that import Guava (to change the import to use the new package name).
> With VENDORING you release a renamed Guava ("vendor") JAR and depend on that directly from your project. So your project's source code itself imports the (repackaged) vendor JAR and depends on the renamed packages directly. Your project build then has no need for shading or byte code rewriting of its own classes. I see vendoring making it very clear what is going on when looking at a project's source code and its dependencies, and there are likely other tangible brass-tacks benefits to vendoring besides the conceptual clarity over shading.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.