Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Idea: checking the behavioral compatibility in the libraries in the LTS BOM

Ouverte
#1,974 12 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@suztomo y travaille déjà.

Depuis le 9/3/2021.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

enhancement p3

Problem

We'd like to see the libraries in LTS BOM are compatible with each other. This is not just for Java class file signature but also for behavioral change.

Idea: run the tests with LTS BOM

To capture behavioral change, we can leverage the tests in the repository of the each library in LTS BOM.

For example, if I want to check the compatibility of protobuf-java in LTS BOM and grpc-protobuf, then I can modify build.gradle to include api enforcedPlatform('com.google.cloud:gcp-lts-bom:0.1.0-SNAPSHOT') to see the compatibility.

I checkout grpc-java Git repository and insert the enforcedPlatform to one of build.gradle:

suztomo@suztomo:~/grpc-java$ git diff
diff --git a/protobuf/build.gradle b/protobuf/build.gradle
index af7f51c83..1c00e0a63 100644
--- a/protobuf/build.gradle
+++ b/protobuf/build.gradle
@@ -10,6 +10,8 @@ plugins {
 description = 'gRPC: Protobuf'
 
 dependencies {
+    api enforcedPlatform('com.google.cloud:gcp-lts-bom:0.1.0-SNAPSHOT')
+
     api project(':grpc-api'),
             libraries.jsr305,
             libraries.protobuf

If the tests pass, then the LTS BOM is compatible with the grpc-protobuf.

suztomo@suztomo:~/grpc-java$ ./gradlew :grpc-protobuf:check
*** Skipping the build of codegen and compilation of proto files because skipCodegen=true
  * Skipping the build of Android projects because skipAndroid=true

BUILD SUCCESSFUL in 3s
19 actionable tasks: 1 executed, 18 up-to-date

Implementation Design

Repositories

Checkout the following repositories with a release tag.

  • Beam
    • org.apache.beam:beam-sdks-java-core
    • org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core
    • org.apache.beam:beam-runners-google-cloud-dataflow-java
    • org.apache.beam:beam-sdks-java-io-google-cloud-platform
  • grpc-java
  • java-spanner
    • google-cloud-spanner
Checking out a specific revision

For example, to checkout java-spannner repository with a specific release tag, run the following command:

git clone -b v4.0.1 --depth=1 https://github.com/googleapis/java-spanner
For Gradle project

For the target modules, insert the BOM after keyword "dependencies":

dependencies {

so that it would look like:

 dependencies {
+    api enforcedPlatform('com.google.cloud:gcp-lts-bom:0.1.0-SNAPSHOT')
+
For Maven project
Langage dominant
Java
Étoiles
165
Forks
82
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de GoogleCloudPlatform/cloud-opensource-java

Toutes les issues de GoogleCloudPlatform/cloud-opensource-java

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.