Mailing List Archive

Bump the Lucene main branch to Java 21
Hi,

A number of us have been iterating on a PR to bump the Lucene main branch to a minimum of Java 21 [1]. The work is in a good state and is almost ready to commit.

While the changes themselves are not large, the impact is arguably larger. So I’m raising awareness here with the wider group.

Clearly one could conflate the bump to Java 21 with the question of when will Lucene have a next major release, but those issues, while somewhat related, are orthogonal. My position is that the next Lucene major should be on Java 21, regardless of when that will happen.

Comments, feedback, suggestions welcome.

Thanks,
-Chris.

[1] https://github.com/apache/lucene/pull/12753


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Bump the Lucene main branch to Java 21 [ In reply to ]
Thank you for the heads up Chris.

So I think this means we are now free to use all the newfangled language
features since Java 11 (min required for Lucene 9.x) -> Java 21?

Mike McCandless

http://blog.mikemccandless.com


On Wed, Feb 21, 2024 at 3:58?AM Chris Hegarty
<christopher.hegarty@elastic.co.invalid> wrote:

> Hi,
>
> A number of us have been iterating on a PR to bump the Lucene main branch
> to a minimum of Java 21 [1]. The work is in a good state and is almost
> ready to commit.
>
> While the changes themselves are not large, the impact is arguably larger.
> So I’m raising awareness here with the wider group.
>
> Clearly one could conflate the bump to Java 21 with the question of when
> will Lucene have a next major release, but those issues, while somewhat
> related, are orthogonal. My position is that the next Lucene major should
> be on Java 21, regardless of when that will happen.
>
> Comments, feedback, suggestions welcome.
>
> Thanks,
> -Chris.
>
> [1] https://github.com/apache/lucene/pull/12753
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
Re: Bump the Lucene main branch to Java 21 [ In reply to ]
Hi Mike,

> On 21 Feb 2024, at 12:34, Michael McCandless <lucene@mikemccandless.com> wrote:
>
> Thank you for the heads up Chris.
>
> So I think this means we are now free to use all the newfangled language features since Java 11 (min required for Lucene 9.x) -> Java 21?

For the _main_ branch, yes.

The _branch_9x_ remains unchanged - it stays on Java 11.

So, if you’re planning to backport a change from main to 9x, then you may want to consider what Java language feature and/or JDK API you use - to make the backport more straightforward. But this is nothing new, _main_ is already on Java 17, while 9x is on Java 11, so the scenario already exists, just that the range is changing with this proposal. Hope this helps.

-Chris.

>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Wed, Feb 21, 2024 at 3:58?AM Chris Hegarty <christopher.hegarty@elastic.co.invalid> wrote:
> Hi,
>
> A number of us have been iterating on a PR to bump the Lucene main branch to a minimum of Java 21 [1]. The work is in a good state and is almost ready to commit.
>
> While the changes themselves are not large, the impact is arguably larger. So I’m raising awareness here with the wider group.
>
> Clearly one could conflate the bump to Java 21 with the question of when will Lucene have a next major release, but those issues, while somewhat related, are orthogonal. My position is that the next Lucene major should be on Java 21, regardless of when that will happen.
>
> Comments, feedback, suggestions welcome.
>
> Thanks,
> -Chris.
>
> [1] https://github.com/apache/lucene/pull/12753
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Bump the Lucene main branch to Java 21 [ In reply to ]
On Wed, Feb 21, 2024 at 7:41?AM Chris Hegarty
<christopher.hegarty@elastic.co.invalid> wrote:

> So I think this means we are now free to use all the newfangled language
> features since Java 11 (min required for Lucene 9.x) -> Java 21?
>
> For the _main_ branch, yes.
>
> The _branch_9x_ remains unchanged - it stays on Java 11.
>
> So, if you’re planning to backport a change from main to 9x, then you may
> want to consider what Java language feature and/or JDK API you use - to
> make the backport more straightforward. But this is nothing new, _main_ is
> already on Java 17, while 9x is on Java 11, so the scenario already exists,
> just that the range is changing with this proposal. Hope this helps.
>

Thanks Chris, this makes sense! So what's new with this change is on main
branch we can now use new language features from Java 17 -> Java 21. But
on backport to 9.x we must still use only Java 11.

Thanks!

Mike McCandless

http://blog.mikemccandless.com