Skip to content

Commit

Permalink
Upgrade JaCoCo to 0.8.8 and ASM 9.4
Browse files Browse the repository at this point in the history
+ ClassProbesMapper fix to initialize the className correctly

Related to bazelbuild#16412
  • Loading branch information
somethingvague committed Mar 13, 2023
1 parent b32af4a commit 1386195
Show file tree
Hide file tree
Showing 35 changed files with 22 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public Map<Integer, BranchExp> result() {
public ClassProbesMapper(String className) {
classLineToBranchExp = new TreeMap<Integer, BranchExp>();
stringPool = new StringPool();
className = stringPool.get(className);
this.className = stringPool.get(className);
}

@Override
Expand Down
20 changes: 10 additions & 10 deletions third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -165,35 +165,35 @@ java_library(
distrib_java_import(
name = "asm",
enable_distributions = ["debian"],
jars = ["asm/asm-9.2.jar"],
srcjar = "asm/asm-9.2-sources.jar",
jars = ["asm/asm-9.4.jar"],
srcjar = "asm/asm-9.4-sources.jar",
)

java_import(
name = "asm-analysis",
jars = ["asm/asm-analysis-9.2.jar"],
srcjar = "asm/asm-analysis-9.2-sources.jar",
jars = ["asm/asm-analysis-9.4.jar"],
srcjar = "asm/asm-analysis-9.4-sources.jar",
runtime_deps = [":asm-tree"],
)

java_import(
name = "asm-commons",
jars = ["asm/asm-commons-9.2.jar"],
srcjar = "asm/asm-commons-9.2-sources.jar",
jars = ["asm/asm-commons-9.4.jar"],
srcjar = "asm/asm-commons-9.4-sources.jar",
runtime_deps = [":asm-tree"],
)

java_import(
name = "asm-tree",
jars = ["asm/asm-tree-9.2.jar"],
srcjar = "asm/asm-tree-9.2-sources.jar",
jars = ["asm/asm-tree-9.4.jar"],
srcjar = "asm/asm-tree-9.4-sources.jar",
runtime_deps = [":asm"],
)

java_import(
name = "asm-util",
jars = ["asm/asm-util-9.2.jar"],
srcjar = "asm/asm-util-9.2-sources.jar",
jars = ["asm/asm-util-9.4.jar"],
srcjar = "asm/asm-util-9.4-sources.jar",
runtime_deps = [":asm-tree"],
)

Expand Down
Binary file removed third_party/asm/asm-9.2-sources.jar
Binary file not shown.
Binary file removed third_party/asm/asm-9.2.jar
Binary file not shown.
Binary file added third_party/asm/asm-9.4-sources.jar
Binary file not shown.
Binary file added third_party/asm/asm-9.4.jar
Binary file not shown.
Binary file removed third_party/asm/asm-analysis-9.2-sources.jar
Binary file not shown.
Binary file removed third_party/asm/asm-analysis-9.2.jar
Binary file not shown.
Binary file added third_party/asm/asm-analysis-9.4-sources.jar
Binary file not shown.
Binary file added third_party/asm/asm-analysis-9.4.jar
Binary file not shown.
Binary file removed third_party/asm/asm-commons-9.2-sources.jar
Binary file not shown.
Binary file removed third_party/asm/asm-commons-9.2.jar
Binary file not shown.
Binary file added third_party/asm/asm-commons-9.4-sources.jar
Binary file not shown.
Binary file added third_party/asm/asm-commons-9.4.jar
Binary file not shown.
Binary file removed third_party/asm/asm-tree-9.2-sources.jar
Binary file not shown.
Binary file removed third_party/asm/asm-tree-9.2.jar
Binary file not shown.
Binary file added third_party/asm/asm-tree-9.4-sources.jar
Binary file not shown.
Binary file added third_party/asm/asm-tree-9.4.jar
Binary file not shown.
Binary file removed third_party/asm/asm-util-9.2-sources.jar
Binary file not shown.
Binary file removed third_party/asm/asm-util-9.2.jar
Binary file not shown.
Binary file added third_party/asm/asm-util-9.4-sources.jar
Binary file not shown.
Binary file added third_party/asm/asm-util-9.4.jar
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d49447aae32e1794dfc5d5e31c848d57e27d17a7 Mon Sep 17 00:00:00 2001
From c3d5e0ff638caf0038ce46054b906d51d59623e6 Mon Sep 17 00:00:00 2001
From: Liam Miller-Cushon <cushon@google.com>
Date: Thu, 28 Jan 2021 22:18:36 -0800
Subject: [PATCH 2/2] Partially revert 40c8fd89b0bc0c36e30e6a12f5b42d9da13aca86
Subject: [PATCH] Partially revert 40c8fd89b0bc0c36e30e6a12f5b42d9da13aca86

See b/177687001#comment5.
---
Expand All @@ -10,7 +10,7 @@ See b/177687001#comment5.
2 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java
index efb74846..bba5dd1d 100644
index 1f1696ff..cc5d37db 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java
@@ -44,11 +44,8 @@ public class Agent implements IAgent {
Expand Down Expand Up @@ -46,7 +46,7 @@ index efb74846..bba5dd1d 100644
}

diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java
index 476c4e2b..70bb4e8a 100644
index 60c56686..c425f7a1 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java
@@ -23,25 +23,17 @@ import org.jacoco.core.runtime.RuntimeData;
Expand Down Expand Up @@ -92,5 +92,5 @@ index 476c4e2b..70bb4e8a 100644
.getProbes();
}
--
2.32.0.93.g670b81a890-goog
2.37.1 (Apple Git-137.1)

12 changes: 6 additions & 6 deletions third_party/java/jacoco/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Description:
# JaCoCo is a free code coverage library for Java, created by the EclEmma team.
#
# https://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/0.8.7/jacoco-0.8.7.zip
# https://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/0.8.8/jacoco-0.8.8.zip

load("//tools/distributions:distribution_rules.bzl", "distrib_jar_filegroup", "distrib_java_import")
load("//src:release_archive.bzl", "release_archive")
Expand All @@ -12,9 +12,9 @@ exports_files(["LICENSE"])

package(default_visibility = ["//visibility:public"])

LASTVERSION = "0.8.7"
LASTVERSION = "0.8.8"

VERSIONS = ("0.8.7",)
VERSIONS = ("0.8.7", "0.8.8")

filegroup(
name = "srcs",
Expand All @@ -38,9 +38,9 @@ filegroup(
["*-sources.jar"],
allow_empty = True,
) + ["LICENSE"] + [
"//third_party:asm/asm-9.2-sources.jar",
"//third_party:asm/asm-analysis-9.2-sources.jar",
"//third_party:asm/asm-commons-9.2-sources.jar",
"//third_party:asm/asm-9.4-sources.jar",
"//third_party:asm/asm-analysis-9.4-sources.jar",
"//third_party:asm/asm-commons-9.4-sources.jar",
],
)

Expand Down
Binary file added third_party/java/jacoco/jacocoagent-0.8.8.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added third_party/java/jacoco/org.jacoco.ant-0.8.8.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 1386195

Please sign in to comment.