You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "dweiss (via GitHub)" <gi...@apache.org> on 2025/09/28 18:45:09 UTC
[I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
dweiss opened a new issue, #15246:
URL: https://github.com/apache/lucene/issues/15246
### Description
Tracking issue to re-enable forbidden apis checker once it supports JDK 25.
https://github.com/policeman-tools/forbidden-apis/pull/272
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3368592027
[Release notes](https://github.com/policeman-tools/forbidden-apis/wiki/Changes#version-310-released-2025-10-04)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3346324600
> It's targetCompatibility property. I've re-enabled the task with JDK 24 signatures.
Thanks! Naming is different from Maven :-) But we have [documentation](https://jenkins.thetaphi.de/job/Forbidden-APIs/javadoc/gradleApi.html#getTargetCompatibility--) for it...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler closed issue #15246: Re-enable forbidden-apis checker when it supports JDK 25
URL: https://github.com/apache/lucene/issues/15246
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3368575833
Hi,
I released forbiddenapis. With the new build infrastructure, integration testing was much more complicated and it costed me half an hour until I got the new Gradle running with the plugin from `mavenLocal()` (I wanted to do this before I publish the plugin in Maven Central and the Gradle Plugin portal). Both is now done!
For reference, here are my changes I needed for integration testing:
```patch
build-tools/build-infra-shadow/build.gradle | 1 +
build-tools/build-infra/build.gradle | 3 ++-
build.gradle | 8 --------
gradle/libs.versions.toml | 2 +-
settings.gradle | 1 +
5 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/build-tools/build-infra-shadow/build.gradle b/build-tools/build-infra-shadow/build.gradle
index 5b0e3b1a594..f95d3b366e7 100644
--- a/build-tools/build-infra-shadow/build.gradle
+++ b/build-tools/build-infra-shadow/build.gradle
@@ -20,6 +20,7 @@ plugins {
}
repositories {
+ mavenLocal()
mavenCentral()
gradlePluginPortal()
}
diff --git a/build-tools/build-infra/build.gradle b/build-tools/build-infra/build.gradle
index f9b95276852..aaab60c6d97 100644
--- a/build-tools/build-infra/build.gradle
+++ b/build-tools/build-infra/build.gradle
@@ -19,10 +19,11 @@ plugins {
id "java-gradle-plugin"
id "groovy-gradle-plugin"
- alias(deps.plugins.forbiddenapis) apply false
+ // alias(deps.plugins.forbiddenapis) apply false
}
repositories {
+ mavenLocal()
mavenCentral()
gradlePluginPortal()
}
diff --git a/build.gradle b/build.gradle
index 638c81f92bc..ae99b51f7ad 100644
--- a/build.gradle
+++ b/build.gradle
@@ -56,11 +56,3 @@ plugins {
}
description = 'Grandparent project for Apache Lucene Core'
-
-// Force forbidden-apis tasks to use JDK 24 signatures until it supports JDK 25;
-// https://github.com/policeman-tools/forbidden-apis/pull/272
-allprojects {
- tasks.withType(CheckForbiddenApis.class).configureEach {
- targetCompatibility = "24"
- }
-}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 8c93b15419c..a1fe418d369 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -100,7 +100,7 @@ benmanes-versions = "com.github.ben-manes.versions:0.52.0"
carrotsearch-buildopts = "com.carrotsearch.gradle.opts:0.2.0"
carrotsearch-dependencychecks = "com.carrotsearch.gradle.dependencychecks:0.1.0"
errorprone = "net.ltgt.errorprone:4.3.0"
-forbiddenapis = "de.thetaphi.forbiddenapis:3.9"
+forbiddenapis = "de.thetaphi.forbiddenapis:3.10"
jacocolog = "org.barfuin.gradle.jacocolog:3.1.0"
randomizedtesting = "com.carrotsearch.gradle.randomizedtesting:0.0.6"
spotless = "com.diffplug.spotless:7.2.1"
diff --git a/settings.gradle b/settings.gradle
index 50480f1479f..5e56496fe6c 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -17,6 +17,7 @@
pluginManagement {
repositories {
+ mavenLocal()
mavenCentral()
gradlePluginPortal()
}
```
@dweiss: Do you have a better idea how to test it? Actually it was much better than before, because you had that hack that changes the plugin identifier to use the Maven Central repository to fetch the plugin. Why was this done? I am talking about this:
https://github.com/apache/lucene/blob/602bfbd9af0ee9027de45c1572527eee6b073841/build-tools/build-infra/build.gradle#L65-L67
Was it not working with Gradle plugin portal as was this done to get testinmg done easier -- for me?
If we could add something like above patch directly integrated with some system property, it would be cool!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3369259155
Not all plugins have their counterparts in Maven Central and it was difficult to figure out which do, so I think at some point I just decided to use the gradle plugins repo for all plugins. I don't think there is any other reason (or I can't remember it).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3369204982
> Was it not working with Gradle plugin portal as was this done to get testinmg done easier -- for me?
You can't apply a gradle plugin as a Java project dependency... I also find it weird but if you're writing a gradle plugin (like we do), dependencies on other plugins must be expressed like any other maven dependencies and gradle's plugin system uses a completely different naming than Maven Central.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3368580849
Here is the PR for update: #15291
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3346212786
You can also just set targetVersion and releaseVersion forbiddenapis properties to "24" until we have an update.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3344332758
Forbiddenapis supports Java 25 out of box, only the bundled signatures won't work (as it won't find them).
As workaround you can hardcode the version number into the bundled signatures (just append `-24` to `jdk-deprecated` and `jdk-unsafe`). Of course this won't detect new deprecated calls, but the unsafe signatures won't change anyways.
In next forbiddenapis I am planning to have an automatic fallback (also for `commons-io-unsafe`) so it chooses a signature file with next available version (and log warning).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3346300381
It's targetCompatibility property. I've re-enabled the task with JDK 24 signatures.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Re-enable forbidden-apis checker when it supports JDK 25 [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #15246:
URL: https://github.com/apache/lucene/issues/15246#issuecomment-3369211343
> > Was it not working with Gradle plugin portal as was this done to get testinmg done easier -- for me?
>
> You can't apply a gradle plugin as a Java project dependency... I also find it weird but if you're writing a gradle plugin (like we do), dependencies on other plugins must be expressed like any other maven dependencies and gradle's plugin system uses a completely different naming than Maven Central.
Thats obvious, but why does it use the "native naming" (original Maven coordinates) for forbiddenapis, but not the others, Or is this because forbiddenapis is the only one which is also published at maven central (which i find more trustworthy than the Gradle Plugin portal). The deplyoment I do at Gradle Plugin portal is for example missing GPG signatures. Actually my deplyment script just downloads from Maven Central and pushes to Gradle Plugin portal with modified POM.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org