You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by Gus Heck <gu...@gmail.com> on 2024/10/24 14:18:45 UTC

Re: [PR] Bump up Java version to 21 [solr]

I just updated (merging main into a branch I'm working on). Now Intellij
can't even reload gradle:

A problem occurred configuring root project 'solr-root'.
> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':classpath'.
      > Could not resolve project :build-infra.
        Required by:
            project :
         > No matching variant of project :build-infra was found. The
consumer was configured to find a library for use during runtime,
compatible with Java 17, packaged as a jar, and its dependencies declared
externally, as well as attribute 'org.gradle.plugin.api-version' with value
'8.4' but:
             - Variant 'apiElements' capability
org.apache:build-infra:unspecified declares a library, packaged as a jar,
and its dependencies declared externally:
                 - Incompatible because this component declares a component
for use during compile-time, compatible with Java 21 and the consumer
needed a component for use during runtime, compatible with Java 17
                 - Other compatible attribute:
                     - Doesn't say anything about
org.gradle.plugin.api-version (required '8.4')
             - Variant 'mainSourceElements' capability
org.apache:build-infra:unspecified declares a component, and its
dependencies declared externally:
                 - Incompatible because this component declares a component
of category 'verification' and the consumer needed a library
                 - Other compatible attributes:
                     - Doesn't say anything about its target Java version
(required compatibility with Java 17)
                     - Doesn't say anything about its elements (required
them packaged as a jar)
                     - Doesn't say anything about
org.gradle.plugin.api-version (required '8.4')
                     - Doesn't say anything about its usage (required
runtime)
             - Variant 'runtimeElements' capability
org.apache:build-infra:unspecified declares a library for use during
runtime, packaged as a jar, and its dependencies declared externally:
                 - Incompatible because this component declares a
component, compatible with Java 21 and the consumer needed a component,
compatible with Java 17
                 - Other compatible attribute:
                     - Doesn't say anything about
org.gradle.plugin.api-version (required '8.4')
             - Variant 'testResultsElementsForTest' capability
org.apache:build-infra:unspecified:
                 - Incompatible because this component declares a component
of category 'verification' and the consumer needed a library
                 - Other compatible attributes:
                     - Doesn't say anything about how its dependencies are
found (required its dependencies declared externally)
                     - Doesn't say anything about its target Java version
(required compatibility with Java 17)
                     - Doesn't say anything about its elements (required
them packaged as a jar)
                     - Doesn't say anything about
org.gradle.plugin.api-version (required '8.4')
                     - Doesn't say anything about its usage (required
runtime)

On Wed, Oct 23, 2024 at 10:33 PM iamsanjay (via GitHub) <gi...@apache.org>
wrote:

>
> iamsanjay merged PR #2682:
> URL: https://github.com/apache/solr/pull/2682
>
>
> --
> 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@solr.apache.org
>
> For queries about this service, please contact Infrastructure at:
> users@infra.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
> For additional commands, e-mail: issues-help@solr.apache.org
>
>

-- 
http://www.needhamsoftware.com (work)
https://a.co/d/b2sZLD9 (my fantasy fiction book)

Re: [PR] Bump up Java version to 21 [solr]

Posted by Gus Heck <gu...@gmail.com>.
hmm when I try to change the project jdk to 21 in intellij I get

Cannot Save Settings
Content root
'/home/gus/projects/gus-asf/solr/fork/solr/solr/benchmark/src/test-files'
is defined for modules 'org.apache.solr.solr-root.solr.benchmark.test' and
'solr-root.solr.benchmark.test'. Two modules in a project cannot share the
same content root.

On Thu, Oct 24, 2024 at 12:28 PM Christos Malliaridis <
malliaridis@apache.org> wrote:

> Just noticed, Gradle 8.4 does not support JDK 21 (only up to 20). So the
> last part about updating Gradle JVM in the IDE may cause other issues.
>
> I guess upgrading Gradle is one of the next steps. :)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>

-- 
http://www.needhamsoftware.com (work)
https://a.co/d/b2sZLD9 (my fantasy fiction book)

Re: [PR] Bump up Java version to 21 [solr]

Posted by David Smiley <ds...@apache.org>.
I've seen that error too from IntelliJ (or maybe just viewed in IntelliJ
but "from Gradle") at an earlier iteration of the JDK 21 PR when it was
using toolchains.  But not since.

On Thu, Oct 24, 2024 at 1:41 PM Christos Malliaridis <ma...@apache.org>
wrote:

> That makes sense, thanks for the details. I looked into the release notes
> and it says:
>
> > Gradle now supports using Java 21 for compiling, testing, and starting
> other Java programs. This can be accomplished using toolchains.
> >
> > Currently, you cannot run Gradle on Java 21 because Kotlin lacks support
> for JDK 21. However, support for running Gradle with Java 21 is expected in
> future versions.
>
> The error I faced was probably related to the new Admin UI that makes use
> of Kotlin. In that case I will try using SolrJ's JDK version and review the
> build and deployment / distribution part.
>
> On 2024/10/24 17:08:36 sanjay dutt wrote:
> > Gradle 8.4 does support JDK 21 as mentioned in release notes as well. Is
> > there any specific error that you are getting?
> >
> > https://docs.gradle.org/8.4/release-notes.html
> > This release features several improvements for JVM-based projects. Java
> 21
> > <https://docs.gradle.org/8.4/release-notes.html#java-21> is now
> supported
> > for compiling, testing, and running such projects.
> >
> > Also I just backported some changes, and there was no need to change the
> > Java version. I mean Yes If you want to use JDK 11 only for compiling and
> > running test cases, otherwise JDK 21 would generate a java file version
> > which will be mentioned as per the sourceCompatibility which has to be
> less
> > or equal than current JAVA_HOME. In this case, branch_9x is on 11 and
> there
> > should be no problem running it on JDK 21.
> >
> > Other than that our CI jobs for 9x are still on JDK 11.
> >
> > While releasing 9.8, JAVA_HOME has to point 11 because otherwise
> > smokeTestRelease will fail as there is a check to make sure it should be
> > built by 11 only.
> >
> > Regarding the toolchain, I will provide details in a separate email.
> >
> > -- Sanjay
> >
> >
> >
> >
> > On Thu, Oct 24, 2024 at 9:58 PM Christos Malliaridis <
> malliaridis@apache.org>
> > wrote:
> >
> > > Just noticed, Gradle 8.4 does not support JDK 21 (only up to 20). So
> the
> > > last part about updating Gradle JVM in the IDE may cause other issues.
> > >
> > > I guess upgrading Gradle is one of the next steps. :)
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > For additional commands, e-mail: dev-help@solr.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>

Re: [PR] Bump up Java version to 21 [solr]

Posted by David Smiley <ds...@apache.org>.
Value: "Project SDK".
And my project's SDK is azul-21.

On Sun, Oct 27, 2024 at 3:57 PM Christos Malliaridis <
c.malliaridis@gmail.com> wrote:

> @David what version is your Gradle JVM running on? (Settings -> Build,
> Execution, Deployment -> Build Tools -> Gradle -> "Gradle JVM" field)
>
> On Sun, Oct 27, 2024 at 8:27 PM David Smiley <ds...@apache.org> wrote:
>
> > FWIW I didn't change my IntelliJ installation setup on macOS for this
> > Gradle / Solr build change.  In the project settings for Solr, I chose
> JDK
> > 21 and that's all.
> >
> > I was also able to build branch_9x with JDK 21 just fine.
> >
> > On Sat, Oct 26, 2024 at 10:58 AM Gus Heck <gu...@gmail.com> wrote:
> >
> > > That's far more polite than the linux edition, where it is much less
> > > helpful and entirely fails to run:
> > >
> > > Invalid Gradle JDK configuration found. Open Gradle Settings
> > >
> > > On Sat, Oct 26, 2024 at 10:30 AM Christos Malliaridis <
> > > malliaridis@apache.org> wrote:
> > >
> > > > So after a bit of trying around, I am facing the error message on Mac
> > and
> > > > Windows with the latest stable IDE version of IntelliJ. The error
> > message
> > > > is returned at the end of every ./gradlew check and is probably
> coming
> > > from
> > > > the IDE and not Gradle itself. Just for reference what the message
> > looks
> > > > like:
> > > >
> > > > > Your build is currently configured to use incompatible Java 21.0.5
> > and
> > > > Gradle 8.4. Cannot sync the project.
> > > > >
> > > > > We recommend upgrading to Gradle version 8.8.
> > > > >
> > > > > The minimum compatible Gradle version is 8.5.
> > > > >
> > > > > The maximum compatible Gradle JVM version is 20.
> > > > >
> > > > > Possible solutions:
> > > > >  - Upgrade to Gradle 8.8 and re-sync
> > > > >  - Upgrade to Gradle 8.5 and re-sync
> > > > >  - Use Java 20 as Gradle JVM: Open Gradle settings
> > > >
> > > > Since everything keeps working fine though, there is no "blocking
> > issue"
> > > > that needs to be addressed, at least from my perspective.
> > > >
> > > > However, if there is no blocker for updating Gradle, I'd like to
> > address
> > > > this in the upcoming dependency updates. Lucene is on Gradle 8.10
> > > already,
> > > > so this would probably be a good candidate to keep changes in sync.
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > > For additional commands, e-mail: dev-help@solr.apache.org
> > > >
> > > >
> > >
> > > --
> > > http://www.needhamsoftware.com (work)
> > > https://a.co/d/b2sZLD9 (my fantasy fiction book)
> > >
> >
>

Re: [PR] Bump up Java version to 21 [solr]

Posted by Christos Malliaridis <c....@gmail.com>.
@David what version is your Gradle JVM running on? (Settings -> Build,
Execution, Deployment -> Build Tools -> Gradle -> "Gradle JVM" field)

On Sun, Oct 27, 2024 at 8:27 PM David Smiley <ds...@apache.org> wrote:

> FWIW I didn't change my IntelliJ installation setup on macOS for this
> Gradle / Solr build change.  In the project settings for Solr, I chose JDK
> 21 and that's all.
>
> I was also able to build branch_9x with JDK 21 just fine.
>
> On Sat, Oct 26, 2024 at 10:58 AM Gus Heck <gu...@gmail.com> wrote:
>
> > That's far more polite than the linux edition, where it is much less
> > helpful and entirely fails to run:
> >
> > Invalid Gradle JDK configuration found. Open Gradle Settings
> >
> > On Sat, Oct 26, 2024 at 10:30 AM Christos Malliaridis <
> > malliaridis@apache.org> wrote:
> >
> > > So after a bit of trying around, I am facing the error message on Mac
> and
> > > Windows with the latest stable IDE version of IntelliJ. The error
> message
> > > is returned at the end of every ./gradlew check and is probably coming
> > from
> > > the IDE and not Gradle itself. Just for reference what the message
> looks
> > > like:
> > >
> > > > Your build is currently configured to use incompatible Java 21.0.5
> and
> > > Gradle 8.4. Cannot sync the project.
> > > >
> > > > We recommend upgrading to Gradle version 8.8.
> > > >
> > > > The minimum compatible Gradle version is 8.5.
> > > >
> > > > The maximum compatible Gradle JVM version is 20.
> > > >
> > > > Possible solutions:
> > > >  - Upgrade to Gradle 8.8 and re-sync
> > > >  - Upgrade to Gradle 8.5 and re-sync
> > > >  - Use Java 20 as Gradle JVM: Open Gradle settings
> > >
> > > Since everything keeps working fine though, there is no "blocking
> issue"
> > > that needs to be addressed, at least from my perspective.
> > >
> > > However, if there is no blocker for updating Gradle, I'd like to
> address
> > > this in the upcoming dependency updates. Lucene is on Gradle 8.10
> > already,
> > > so this would probably be a good candidate to keep changes in sync.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > For additional commands, e-mail: dev-help@solr.apache.org
> > >
> > >
> >
> > --
> > http://www.needhamsoftware.com (work)
> > https://a.co/d/b2sZLD9 (my fantasy fiction book)
> >
>

Re: [PR] Bump up Java version to 21 [solr]

Posted by David Smiley <ds...@apache.org>.
FWIW I didn't change my IntelliJ installation setup on macOS for this
Gradle / Solr build change.  In the project settings for Solr, I chose JDK
21 and that's all.

I was also able to build branch_9x with JDK 21 just fine.

On Sat, Oct 26, 2024 at 10:58 AM Gus Heck <gu...@gmail.com> wrote:

> That's far more polite than the linux edition, where it is much less
> helpful and entirely fails to run:
>
> Invalid Gradle JDK configuration found. Open Gradle Settings
>
> On Sat, Oct 26, 2024 at 10:30 AM Christos Malliaridis <
> malliaridis@apache.org> wrote:
>
> > So after a bit of trying around, I am facing the error message on Mac and
> > Windows with the latest stable IDE version of IntelliJ. The error message
> > is returned at the end of every ./gradlew check and is probably coming
> from
> > the IDE and not Gradle itself. Just for reference what the message looks
> > like:
> >
> > > Your build is currently configured to use incompatible Java 21.0.5 and
> > Gradle 8.4. Cannot sync the project.
> > >
> > > We recommend upgrading to Gradle version 8.8.
> > >
> > > The minimum compatible Gradle version is 8.5.
> > >
> > > The maximum compatible Gradle JVM version is 20.
> > >
> > > Possible solutions:
> > >  - Upgrade to Gradle 8.8 and re-sync
> > >  - Upgrade to Gradle 8.5 and re-sync
> > >  - Use Java 20 as Gradle JVM: Open Gradle settings
> >
> > Since everything keeps working fine though, there is no "blocking issue"
> > that needs to be addressed, at least from my perspective.
> >
> > However, if there is no blocker for updating Gradle, I'd like to address
> > this in the upcoming dependency updates. Lucene is on Gradle 8.10
> already,
> > so this would probably be a good candidate to keep changes in sync.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > For additional commands, e-mail: dev-help@solr.apache.org
> >
> >
>
> --
> http://www.needhamsoftware.com (work)
> https://a.co/d/b2sZLD9 (my fantasy fiction book)
>

Re: [PR] Bump up Java version to 21 [solr]

Posted by Gus Heck <gu...@gmail.com>.
That's far more polite than the linux edition, where it is much less
helpful and entirely fails to run:

Invalid Gradle JDK configuration found. Open Gradle Settings

On Sat, Oct 26, 2024 at 10:30 AM Christos Malliaridis <
malliaridis@apache.org> wrote:

> So after a bit of trying around, I am facing the error message on Mac and
> Windows with the latest stable IDE version of IntelliJ. The error message
> is returned at the end of every ./gradlew check and is probably coming from
> the IDE and not Gradle itself. Just for reference what the message looks
> like:
>
> > Your build is currently configured to use incompatible Java 21.0.5 and
> Gradle 8.4. Cannot sync the project.
> >
> > We recommend upgrading to Gradle version 8.8.
> >
> > The minimum compatible Gradle version is 8.5.
> >
> > The maximum compatible Gradle JVM version is 20.
> >
> > Possible solutions:
> >  - Upgrade to Gradle 8.8 and re-sync
> >  - Upgrade to Gradle 8.5 and re-sync
> >  - Use Java 20 as Gradle JVM: Open Gradle settings
>
> Since everything keeps working fine though, there is no "blocking issue"
> that needs to be addressed, at least from my perspective.
>
> However, if there is no blocker for updating Gradle, I'd like to address
> this in the upcoming dependency updates. Lucene is on Gradle 8.10 already,
> so this would probably be a good candidate to keep changes in sync.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>

-- 
http://www.needhamsoftware.com (work)
https://a.co/d/b2sZLD9 (my fantasy fiction book)

Re: [PR] Bump up Java version to 21 [solr]

Posted by Christos Malliaridis <ma...@apache.org>.
So after a bit of trying around, I am facing the error message on Mac and Windows with the latest stable IDE version of IntelliJ. The error message is returned at the end of every ./gradlew check and is probably coming from the IDE and not Gradle itself. Just for reference what the message looks like:

> Your build is currently configured to use incompatible Java 21.0.5 and Gradle 8.4. Cannot sync the project.
> 
> We recommend upgrading to Gradle version 8.8.
> 
> The minimum compatible Gradle version is 8.5.
> 
> The maximum compatible Gradle JVM version is 20.
> 
> Possible solutions:
>  - Upgrade to Gradle 8.8 and re-sync
>  - Upgrade to Gradle 8.5 and re-sync
>  - Use Java 20 as Gradle JVM: Open Gradle settings

Since everything keeps working fine though, there is no "blocking issue" that needs to be addressed, at least from my perspective.

However, if there is no blocker for updating Gradle, I'd like to address this in the upcoming dependency updates. Lucene is on Gradle 8.10 already, so this would probably be a good candidate to keep changes in sync.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org


Re: [PR] Bump up Java version to 21 [solr]

Posted by Gus Heck <gu...@gmail.com>.
No I meant build tool, meaning gradle the compatibility matrix
<https://docs.gradle.org/current/userguide/compatibility.html> says you
shouldn't run gradle 8.4 on 21 and that requires 8.5. It seems we should be
upgrading to  There's apparently some support for toolchains, but if we're
using that it's not working within the context of the ide (for me on linux
at least). The announcement thread and this thread mention JAVA_HOME but
that has no meaning from an ide perspective. I don't start my ide from a
command line I hit the super key, (windows key equiv) and type inte which
highlights an intellij icon and hit return. My ide is installed via the
toolbox, so it's using whatever the default for that is.

I'm posting email replies here (not replying in github) because It's not
clear that my problems are something that should be announced yet? If
there's a further useful solution achieved I would think that could go
there?

I've switched to main, and updated to
6ac993bec72dee1a68aad3f63f74d961a3a50616 I also deleted .idea and .gradle
in case those held some kruft. I also have updated to java 21 and rebooted
my computer, all terminals now give

gus@ns-l1:~/projects/gus-asf/solr/fork/solr$ java -version
openjdk version "21.0.5" 2024-10-15 LTS
OpenJDK Runtime Environment Zulu21.38+21-CA (build 21.0.5+11-LTS)
OpenJDK 64-Bit Server VM Zulu21.38+21-CA (build 21.0.5+11-LTS, mixed mode,
sharing)

IDE info:

IntelliJ IDEA 2024.2.4 (Ultimate Edition)
Build #IU-242.23726.103, built on October 23, 2024
Licensed to Patrick Heck
Subscription is active until November 16, 2024.
Runtime version: 21.0.4+13-b509.26 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.8.0-47-generic

Interestingly, despite the matrix, I can run ./gradlew clean from -debug
the command line and it logs:
2024-10-24T15:22:03.835-0400 [INFO]
[org.gradle.internal.jvm.inspection.DefaultJvmMetadataDetector] Received
JVM installation metadata from '/usr/lib/jvm/zulu-21-amd64':
{JAVA_HOME=/usr/lib/jvm/zulu-21-amd64, JAVA_VERSION=21.0.5,
JAVA_VENDOR=Azul Systems, Inc., RUNTIME_NAME=OpenJDK Runtime Environment,
RUNTIME_VERSION=21.0.5+11-LTS, VM_NAME=OpenJDK 64-Bit Server VM,
VM_VERSION=21.0.5+11-LTS, VM_VENDOR=Azul Systems, Inc., OS_ARCH=amd64}

I just discovered that I CAN build if I use the jetbrains runtime in the
gradle options (which is a 17.0.4 flavor), but selecting  Azul systems
17.0.13,   Eclipse Temurin 19.0.2  or  Azul 11.0.23 gives me the long no
matching variant message. (with messages adjusted to match the jdk version
I selected)  one wonders what jetbrains magic is in play there...

On Thu, Oct 24, 2024 at 2:41 PM David Smiley <ds...@apache.org> wrote:

> GUS, I think your comment is best placed for the ANNOUNCE dev list thread,
> not Christos's PR.  Also our "build tool" is Gradle, and it hasn't
> changed.  You meant an IDE but I'm using IntelliJ just fine, and I can say
> IntelliJ compatibility was a critical concern and evaluation I did as a
> reviewer.
>
> On Thu, Oct 24, 2024 at 2:07 PM Gus Heck <gu...@gmail.com> wrote:
>
> > I don't think we should have been pushing a change to a jdk not supported
> > by our build tool?
> >
> > My ide is now refusing to import with the big mismatch in my prior email
> if
> > gradle set to 17 or 19, but if it's set to 21 it just says "Invalid
> Gradle
> > JDK configuration found. Open Gradle Settings"
> >
> > On Thu, Oct 24, 2024 at 1:40 PM Christos Malliaridis <
> > malliaridis@apache.org>
> > wrote:
> >
> > > That makes sense, thanks for the details. I looked into the release
> notes
> > > and it says:
> > >
> > > > Gradle now supports using Java 21 for compiling, testing, and
> starting
> > > other Java programs. This can be accomplished using toolchains.
> > > >
> > > > Currently, you cannot run Gradle on Java 21 because Kotlin lacks
> > support
> > > for JDK 21. However, support for running Gradle with Java 21 is
> expected
> > in
> > > future versions.
> > >
> > > The error I faced was probably related to the new Admin UI that makes
> use
> > > of Kotlin. In that case I will try using SolrJ's JDK version and review
> > the
> > > build and deployment / distribution part.
> > >
> > > On 2024/10/24 17:08:36 sanjay dutt wrote:
> > > > Gradle 8.4 does support JDK 21 as mentioned in release notes as well.
> > Is
> > > > there any specific error that you are getting?
> > > >
> > > > https://docs.gradle.org/8.4/release-notes.html
> > > > This release features several improvements for JVM-based projects.
> Java
> > > 21
> > > > <https://docs.gradle.org/8.4/release-notes.html#java-21> is now
> > > supported
> > > > for compiling, testing, and running such projects.
> > > >
> > > > Also I just backported some changes, and there was no need to change
> > the
> > > > Java version. I mean Yes If you want to use JDK 11 only for compiling
> > and
> > > > running test cases, otherwise JDK 21 would generate a java file
> version
> > > > which will be mentioned as per the sourceCompatibility which has to
> be
> > > less
> > > > or equal than current JAVA_HOME. In this case, branch_9x is on 11 and
> > > there
> > > > should be no problem running it on JDK 21.
> > > >
> > > > Other than that our CI jobs for 9x are still on JDK 11.
> > > >
> > > > While releasing 9.8, JAVA_HOME has to point 11 because otherwise
> > > > smokeTestRelease will fail as there is a check to make sure it should
> > be
> > > > built by 11 only.
> > > >
> > > > Regarding the toolchain, I will provide details in a separate email.
> > > >
> > > > -- Sanjay
> > > >
> > > >
> > > >
> > > >
> > > > On Thu, Oct 24, 2024 at 9:58 PM Christos Malliaridis <
> > > malliaridis@apache.org>
> > > > wrote:
> > > >
> > > > > Just noticed, Gradle 8.4 does not support JDK 21 (only up to 20).
> So
> > > the
> > > > > last part about updating Gradle JVM in the IDE may cause other
> > issues.
> > > > >
> > > > > I guess upgrading Gradle is one of the next steps. :)
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > > > For additional commands, e-mail: dev-help@solr.apache.org
> > > > >
> > > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > For additional commands, e-mail: dev-help@solr.apache.org
> > >
> > >
> >
> > --
> > http://www.needhamsoftware.com (work)
> > https://a.co/d/b2sZLD9 (my fantasy fiction book)
> >
>


-- 
http://www.needhamsoftware.com (work)
https://a.co/d/b2sZLD9 (my fantasy fiction book)

Re: [PR] Bump up Java version to 21 [solr]

Posted by David Smiley <ds...@apache.org>.
GUS, I think your comment is best placed for the ANNOUNCE dev list thread,
not Christos's PR.  Also our "build tool" is Gradle, and it hasn't
changed.  You meant an IDE but I'm using IntelliJ just fine, and I can say
IntelliJ compatibility was a critical concern and evaluation I did as a
reviewer.

On Thu, Oct 24, 2024 at 2:07 PM Gus Heck <gu...@gmail.com> wrote:

> I don't think we should have been pushing a change to a jdk not supported
> by our build tool?
>
> My ide is now refusing to import with the big mismatch in my prior email if
> gradle set to 17 or 19, but if it's set to 21 it just says "Invalid Gradle
> JDK configuration found. Open Gradle Settings"
>
> On Thu, Oct 24, 2024 at 1:40 PM Christos Malliaridis <
> malliaridis@apache.org>
> wrote:
>
> > That makes sense, thanks for the details. I looked into the release notes
> > and it says:
> >
> > > Gradle now supports using Java 21 for compiling, testing, and starting
> > other Java programs. This can be accomplished using toolchains.
> > >
> > > Currently, you cannot run Gradle on Java 21 because Kotlin lacks
> support
> > for JDK 21. However, support for running Gradle with Java 21 is expected
> in
> > future versions.
> >
> > The error I faced was probably related to the new Admin UI that makes use
> > of Kotlin. In that case I will try using SolrJ's JDK version and review
> the
> > build and deployment / distribution part.
> >
> > On 2024/10/24 17:08:36 sanjay dutt wrote:
> > > Gradle 8.4 does support JDK 21 as mentioned in release notes as well.
> Is
> > > there any specific error that you are getting?
> > >
> > > https://docs.gradle.org/8.4/release-notes.html
> > > This release features several improvements for JVM-based projects. Java
> > 21
> > > <https://docs.gradle.org/8.4/release-notes.html#java-21> is now
> > supported
> > > for compiling, testing, and running such projects.
> > >
> > > Also I just backported some changes, and there was no need to change
> the
> > > Java version. I mean Yes If you want to use JDK 11 only for compiling
> and
> > > running test cases, otherwise JDK 21 would generate a java file version
> > > which will be mentioned as per the sourceCompatibility which has to be
> > less
> > > or equal than current JAVA_HOME. In this case, branch_9x is on 11 and
> > there
> > > should be no problem running it on JDK 21.
> > >
> > > Other than that our CI jobs for 9x are still on JDK 11.
> > >
> > > While releasing 9.8, JAVA_HOME has to point 11 because otherwise
> > > smokeTestRelease will fail as there is a check to make sure it should
> be
> > > built by 11 only.
> > >
> > > Regarding the toolchain, I will provide details in a separate email.
> > >
> > > -- Sanjay
> > >
> > >
> > >
> > >
> > > On Thu, Oct 24, 2024 at 9:58 PM Christos Malliaridis <
> > malliaridis@apache.org>
> > > wrote:
> > >
> > > > Just noticed, Gradle 8.4 does not support JDK 21 (only up to 20). So
> > the
> > > > last part about updating Gradle JVM in the IDE may cause other
> issues.
> > > >
> > > > I guess upgrading Gradle is one of the next steps. :)
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > > For additional commands, e-mail: dev-help@solr.apache.org
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > For additional commands, e-mail: dev-help@solr.apache.org
> >
> >
>
> --
> http://www.needhamsoftware.com (work)
> https://a.co/d/b2sZLD9 (my fantasy fiction book)
>

Re: [PR] Bump up Java version to 21 [solr]

Posted by Gus Heck <gu...@gmail.com>.
I don't think we should have been pushing a change to a jdk not supported
by our build tool?

My ide is now refusing to import with the big mismatch in my prior email if
gradle set to 17 or 19, but if it's set to 21 it just says "Invalid Gradle
JDK configuration found. Open Gradle Settings"

On Thu, Oct 24, 2024 at 1:40 PM Christos Malliaridis <ma...@apache.org>
wrote:

> That makes sense, thanks for the details. I looked into the release notes
> and it says:
>
> > Gradle now supports using Java 21 for compiling, testing, and starting
> other Java programs. This can be accomplished using toolchains.
> >
> > Currently, you cannot run Gradle on Java 21 because Kotlin lacks support
> for JDK 21. However, support for running Gradle with Java 21 is expected in
> future versions.
>
> The error I faced was probably related to the new Admin UI that makes use
> of Kotlin. In that case I will try using SolrJ's JDK version and review the
> build and deployment / distribution part.
>
> On 2024/10/24 17:08:36 sanjay dutt wrote:
> > Gradle 8.4 does support JDK 21 as mentioned in release notes as well. Is
> > there any specific error that you are getting?
> >
> > https://docs.gradle.org/8.4/release-notes.html
> > This release features several improvements for JVM-based projects. Java
> 21
> > <https://docs.gradle.org/8.4/release-notes.html#java-21> is now
> supported
> > for compiling, testing, and running such projects.
> >
> > Also I just backported some changes, and there was no need to change the
> > Java version. I mean Yes If you want to use JDK 11 only for compiling and
> > running test cases, otherwise JDK 21 would generate a java file version
> > which will be mentioned as per the sourceCompatibility which has to be
> less
> > or equal than current JAVA_HOME. In this case, branch_9x is on 11 and
> there
> > should be no problem running it on JDK 21.
> >
> > Other than that our CI jobs for 9x are still on JDK 11.
> >
> > While releasing 9.8, JAVA_HOME has to point 11 because otherwise
> > smokeTestRelease will fail as there is a check to make sure it should be
> > built by 11 only.
> >
> > Regarding the toolchain, I will provide details in a separate email.
> >
> > -- Sanjay
> >
> >
> >
> >
> > On Thu, Oct 24, 2024 at 9:58 PM Christos Malliaridis <
> malliaridis@apache.org>
> > wrote:
> >
> > > Just noticed, Gradle 8.4 does not support JDK 21 (only up to 20). So
> the
> > > last part about updating Gradle JVM in the IDE may cause other issues.
> > >
> > > I guess upgrading Gradle is one of the next steps. :)
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > For additional commands, e-mail: dev-help@solr.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>

-- 
http://www.needhamsoftware.com (work)
https://a.co/d/b2sZLD9 (my fantasy fiction book)

Re: [PR] Bump up Java version to 21 [solr]

Posted by Christos Malliaridis <ma...@apache.org>.
That makes sense, thanks for the details. I looked into the release notes and it says:

> Gradle now supports using Java 21 for compiling, testing, and starting other Java programs. This can be accomplished using toolchains.
>
> Currently, you cannot run Gradle on Java 21 because Kotlin lacks support for JDK 21. However, support for running Gradle with Java 21 is expected in future versions.

The error I faced was probably related to the new Admin UI that makes use of Kotlin. In that case I will try using SolrJ's JDK version and review the build and deployment / distribution part.

On 2024/10/24 17:08:36 sanjay dutt wrote:
> Gradle 8.4 does support JDK 21 as mentioned in release notes as well. Is
> there any specific error that you are getting?
> 
> https://docs.gradle.org/8.4/release-notes.html
> This release features several improvements for JVM-based projects. Java 21
> <https://docs.gradle.org/8.4/release-notes.html#java-21> is now supported
> for compiling, testing, and running such projects.
> 
> Also I just backported some changes, and there was no need to change the
> Java version. I mean Yes If you want to use JDK 11 only for compiling and
> running test cases, otherwise JDK 21 would generate a java file version
> which will be mentioned as per the sourceCompatibility which has to be less
> or equal than current JAVA_HOME. In this case, branch_9x is on 11 and there
> should be no problem running it on JDK 21.
> 
> Other than that our CI jobs for 9x are still on JDK 11.
> 
> While releasing 9.8, JAVA_HOME has to point 11 because otherwise
> smokeTestRelease will fail as there is a check to make sure it should be
> built by 11 only.
> 
> Regarding the toolchain, I will provide details in a separate email.
> 
> -- Sanjay
> 
> 
> 
> 
> On Thu, Oct 24, 2024 at 9:58 PM Christos Malliaridis <ma...@apache.org>
> wrote:
> 
> > Just noticed, Gradle 8.4 does not support JDK 21 (only up to 20). So the
> > last part about updating Gradle JVM in the IDE may cause other issues.
> >
> > I guess upgrading Gradle is one of the next steps. :)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > For additional commands, e-mail: dev-help@solr.apache.org
> >
> >
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org


Re: [PR] Bump up Java version to 21 [solr]

Posted by sanjay dutt <sa...@gmail.com>.
Gradle 8.4 does support JDK 21 as mentioned in release notes as well. Is
there any specific error that you are getting?

https://docs.gradle.org/8.4/release-notes.html
This release features several improvements for JVM-based projects. Java 21
<https://docs.gradle.org/8.4/release-notes.html#java-21> is now supported
for compiling, testing, and running such projects.

Also I just backported some changes, and there was no need to change the
Java version. I mean Yes If you want to use JDK 11 only for compiling and
running test cases, otherwise JDK 21 would generate a java file version
which will be mentioned as per the sourceCompatibility which has to be less
or equal than current JAVA_HOME. In this case, branch_9x is on 11 and there
should be no problem running it on JDK 21.

Other than that our CI jobs for 9x are still on JDK 11.

While releasing 9.8, JAVA_HOME has to point 11 because otherwise
smokeTestRelease will fail as there is a check to make sure it should be
built by 11 only.

Regarding the toolchain, I will provide details in a separate email.

-- Sanjay




On Thu, Oct 24, 2024 at 9:58 PM Christos Malliaridis <ma...@apache.org>
wrote:

> Just noticed, Gradle 8.4 does not support JDK 21 (only up to 20). So the
> last part about updating Gradle JVM in the IDE may cause other issues.
>
> I guess upgrading Gradle is one of the next steps. :)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>

Re: [PR] Bump up Java version to 21 [solr]

Posted by Christos Malliaridis <ma...@apache.org>.
Just noticed, Gradle 8.4 does not support JDK 21 (only up to 20). So the last part about updating Gradle JVM in the IDE may cause other issues.

I guess upgrading Gradle is one of the next steps. :)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org


Re: [PR] Bump up Java version to 21 [solr]

Posted by Christos Malliaridis <ma...@apache.org>.
I had the same issue on Windows. I updated the JAVA_HOME and PATH to point to JDK 21. Since I have multiple JDKs installed, the order in PATH is important, as only the first path to a JDK directory is taken into account by IntelliJ.

I also updated the Gradle JVM under Build, Execution, Deployment -> Build Tools -> Gradle to use the same JDK.

For those who will backport changes to 9x it may be very time consuming switching everything again and restarting the IDE. I am wondering if this is a use case for toolchain resolvers.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org


Re: [PR] Bump up Java version to 21 [solr]

Posted by sanjay dutt <sa...@gmail.com>.
I believe this should go away by setting JAVA_HOME to 21.

-- Sanjay