Skip to content

Commit 3789507

Browse files
authored
Fix japicmp (#8067)
1 parent 1eadd1e commit 3789507

25 files changed

+28
-28
lines changed

buildSrc/src/main/kotlin/otel.japicmp-conventions.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ fun getAllPublishedModules(): List<Project> {
7474
}.toList()
7575
}
7676

77-
fun getOldClassPath(version: String): List<File> {
77+
fun getClasspathForVersion(version: String): List<File> {
7878
// Temporarily change the group name because we want to fetch an artifact with the same
7979
// Maven coordinates as the project, which Gradle would not allow otherwise.
8080
val existingGroup = group
@@ -95,7 +95,7 @@ fun getOldClassPath(version: String): List<File> {
9595
}
9696
}
9797

98-
fun getNewClassPath(): List<File> {
98+
fun getCurrentClassPath(): List<File> {
9999
return getAllPublishedModules().map {
100100
val archiveFile = it.tasks.getByName<Jar>("jar").archiveFile
101101
archiveFile.get().asFile
@@ -125,8 +125,8 @@ if (!project.hasProperty("otel.release") && !project.name.startsWith("bom")) {
125125
// and generates false positive compatibility errors when methods are lifted into superclasses,
126126
// superinterfaces.
127127
val archiveName = base.archivesName.get()
128-
val newClassPath = getNewClassPath()
129-
val oldClassPath = getOldClassPath(baselineVersion)
128+
val newClassPath = apiNewVersion?.let { getClasspathForVersion(it) } ?: getCurrentClassPath()
129+
val oldClassPath = getClasspathForVersion(baselineVersion)
130130
val pattern = (archiveName + "-([0-9\\.]*)(-SNAPSHOT)?.jar").toRegex()
131131
val newArchive = newClassPath.singleOrNull { it.name.matches(pattern) }
132132
val oldArchive = oldClassPath.singleOrNull { it.name.matches(pattern) }

docs/apidiffs/1.59.0_vs_1.58.0/opentelemetry-api.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Comparing source compatibility of opentelemetry-api-1.60.0-SNAPSHOT.jar against opentelemetry-api-1.58.0.jar
1+
Comparing source compatibility of opentelemetry-api-1.59.0.jar against opentelemetry-api-1.58.0.jar
22
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.common.AttributeKey (not serializable)
33
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
44
GENERIC TEMPLATES: === T:java.lang.Object
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-common-1.60.0-SNAPSHOT.jar against opentelemetry-common-1.58.0.jar
1+
Comparing source compatibility of opentelemetry-common-1.59.0.jar against opentelemetry-common-1.58.0.jar
22
No changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-context-1.60.0-SNAPSHOT.jar against opentelemetry-context-1.58.0.jar
1+
Comparing source compatibility of opentelemetry-context-1.59.0.jar against opentelemetry-context-1.58.0.jar
22
No changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-exporter-common-1.60.0-SNAPSHOT.jar against opentelemetry-exporter-common-1.58.0.jar
1+
Comparing source compatibility of opentelemetry-exporter-common-1.59.0.jar against opentelemetry-exporter-common-1.58.0.jar
22
No changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-exporter-logging-otlp-1.60.0-SNAPSHOT.jar against opentelemetry-exporter-logging-otlp-1.58.0.jar
1+
Comparing source compatibility of opentelemetry-exporter-logging-otlp-1.59.0.jar against opentelemetry-exporter-logging-otlp-1.58.0.jar
22
No changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-exporter-logging-1.60.0-SNAPSHOT.jar against opentelemetry-exporter-logging-1.58.0.jar
1+
Comparing source compatibility of opentelemetry-exporter-logging-1.59.0.jar against opentelemetry-exporter-logging-1.58.0.jar
22
No changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-exporter-otlp-common-1.60.0-SNAPSHOT.jar against opentelemetry-exporter-otlp-common-1.58.0.jar
1+
Comparing source compatibility of opentelemetry-exporter-otlp-common-1.59.0.jar against opentelemetry-exporter-otlp-common-1.58.0.jar
22
No changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-exporter-otlp-1.60.0-SNAPSHOT.jar against opentelemetry-exporter-otlp-1.58.0.jar
1+
Comparing source compatibility of opentelemetry-exporter-otlp-1.59.0.jar against opentelemetry-exporter-otlp-1.58.0.jar
22
No changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Comparing source compatibility of opentelemetry-exporter-sender-grpc-managed-channel-1.60.0-SNAPSHOT.jar against opentelemetry-exporter-sender-grpc-managed-channel-1.58.0.jar
1+
Comparing source compatibility of opentelemetry-exporter-sender-grpc-managed-channel-1.59.0.jar against opentelemetry-exporter-sender-grpc-managed-channel-1.58.0.jar
22
No changes.

0 commit comments

Comments
 (0)