Re: How are precompiled ICU files generated in Lucene upgrade

Dawid Weiss <[email protected]> Thu, 30 Oct 2025 06:45:54 +0100
Newsgroups gmane.comp.jakarta.lucene.user
Message-ID <CAM21Rt_FZjmhLMMf84fCyiE32284P+w-7NGTziE8M3qdpJJGTg@mail.gmail.com>
--000000000000b6827f064259c4b9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I don't think there are any guidelines on this other than changes in
Unicode implemented by ICU. So if something
changes in an incompatible way and we can't implement a workaround that
would be compatible, we'd wait with
the upgrade to follow a major Lucene version only.

I CC Robert, he's much more knowledgeable in this than me.

As for automation - this is already pretty simple and we have dependabot
running on github, so it shouldn't be a problem. It is the consequences of
upgrading that are more difficult to assess.

Dawid

On Thu, Oct 30, 2025 at 4:50=E2=80=AFAM Anh D=C5=A9ng B=C3=B9i <dungba.sg@g=
mail.com> wrote:

> Thanks Dawid!
>
> What you said makes sense (reducing build time and catch inconsistency).
>
> I have some follow-up questions, when is the ICU library usually upgraded
> (I previously thought of a major release, but the last upgrade seems to b=
e
> in the middle (10.1 to 10.2)), and are there any drawbacks on upgrading t=
he
> ICU library whenever it's released? Maybe it adds some workloads, but may=
be
> it can be automated?
>
> Regards,
> Anh Dung Bui
>
> On Thu, Oct 23, 2025 at 3:40=E2=80=AFPM Dawid Weiss <[email protected]=
m> wrote:
>
> > If you're on the main branch, the code to regenerate ICU is in
> > lucene.regenerate.icu.gradle:
> >
> >
> >
> https://github.com/apache/lucene/blob/main/build-tools/build-infra/src/ma=
in/groovy/lucene.regenerate.icu.gradle#L4
> >
> > you should bump the version of icu4j and this makes the build use the
> > aligned icu-c version too -
> >
> > https://github.com/apache/lucene/blob/main/gradle/libs.versions.toml#L2=
4
> >
> > Once you do that, run:
> >
> > ./gradlew -p lucene/analysis/icu regenerate
> >
> > and it should regenerate, clean-up and create checksums for all affecte=
d
> > files.
> >
> > - Why aren't we generating them on the fly based on the available ICU
> > > version at runtime? Would that enable users to upgrade ICU versions o=
n
> > > their own without breaking Lucene?
> > >
> >
> > The reasons for not generating them on the fly are multiple - mainly
> we're
> > trying to save on
> > build times (some of the generated resources are very costly or require
> > external tools and infrastructure)
> > but also ensure consistency and catch any changer if they happen in the
> > middleware toolchain somewhere (in theory,
> > if you run the regenerate command above without touching ICU versions,
> you
> > should get identical checksums
> > of all the resulting files, regardless of the platform used, etc.)
> >
> > Dawid
> >
>

--000000000000b6827f064259c4b9--