From edf539490029f13689eff4b9b94fbcb089ffdb45 Mon Sep 17 00:00:00 2001 From: David Schlosnagle Date: Mon, 11 Nov 2024 23:50:28 -0500 Subject: [PATCH 1/2] Fix jmhCompileGeneratedClasses configuration --- tritium-jmh/build.gradle | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tritium-jmh/build.gradle b/tritium-jmh/build.gradle index 5cc994629..6d4a95664 100644 --- a/tritium-jmh/build.gradle +++ b/tritium-jmh/build.gradle @@ -6,11 +6,6 @@ jmh { profilers = ['gc'] } -tasks.jmhCompileGeneratedClasses { - options.annotationProcessorPath = configurations.errorprone - options.errorprone.enabled = true -} - dependencies { jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess' @@ -33,3 +28,18 @@ dependencies { jmhImplementation 'io.dropwizard.metrics:metrics-core' jmhImplementation 'org.slf4j:slf4j-api' } + +// https://github.com/melix/jmh-gradle-plugin/issues/248 +tasks.jmhCompileGeneratedClasses { + options.annotationProcessorPath = configurations.jmhAnnotationProcessor +} + +plugins.withId("net.ltgt.errorprone") { + tasks.jmhCompileGeneratedClasses { + options.errorprone { + enabled = true + // JMH generates duplicate field names like byte p000, p001, p002 + disable("HidingField") + } + } +} From 88980433e793b95a5de7d869363dfa668aca75b1 Mon Sep 17 00:00:00 2001 From: svc-changelog Date: Tue, 12 Nov 2024 05:42:58 +0000 Subject: [PATCH 2/2] Add generated changelog entries --- changelog/@unreleased/pr-2073.v2.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/@unreleased/pr-2073.v2.yml diff --git a/changelog/@unreleased/pr-2073.v2.yml b/changelog/@unreleased/pr-2073.v2.yml new file mode 100644 index 000000000..00329297e --- /dev/null +++ b/changelog/@unreleased/pr-2073.v2.yml @@ -0,0 +1,5 @@ +type: fix +fix: + description: Fix jmhCompileGeneratedClasses configuration + links: + - https://github.com/palantir/tritium/pull/2073