Jandex 3.2.0 changes persistent index format

53 views
Skip to first unread message

Ladislav Thon

unread,
May 20, 2024, 2:52:49 AMMay 20
to Quarkus Development mailing list
Hi,

I released Jandex 3.2.0 last week and while the release announcement (https://smallrye.io/blog/jandex-3-2-0/) contains the information, it's probably best to also warn everyone through this channel as well.

This release increases the persistent index version, due to some new information available in the index (notably, sealed classes and interfaces are now supported). This means that older Jandex releases will not be able to read the indexes produced by Jandex 3.2.0.

Quarkus will bump to Jandex 3.2.0 in version 3.12, so components used in older Quarkus versions should not update Jandex.

Hope that helps.

LT

Julien Ponge

unread,
May 20, 2024, 4:22:54 PMMay 20
to lad...@gmail.com, Quarkus Development mailing list
Hi Ladislav,

Should the version be 4.0.0 instead? (semantic versioning / breaking change)

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALbocOmxuoSaMAt%3D-5sqdybKmefeuwjRhFmq587j1Yrw%2B3jyrQ%40mail.gmail.com.

Ladislav Thon

unread,
May 21, 2024, 2:21:06 AMMay 21
to Julien Ponge, Quarkus Development mailing list
Hi,

there are good arguments for and against that. In the past, Jandex did this kind of breaking changes in minor releases and I wrote that into the Jandex compatibility promise: https://smallrye.io/jandex/jandex/3.2.0/index.html#compatibility_promise Maybe it's time to reconsider that, I'm honestly not sure.

LT

po 20. 5. 2024 v 22:22 odesílatel Julien Ponge <jpo...@redhat.com> napsal:

Stephane Epardaud

unread,
May 21, 2024, 4:36:55 AMMay 21
to lad...@gmail.com, Julien Ponge, Quarkus Development mailing list
I don't know if it applies in this case, but there's ways to add data to indexes by changing the format without breaking previous implementations, a bit like the Java Class File Format, where you can add attributes, and the previous implementations that don't know what to do with the attribute will just ignore it.

Max Rydahl Andersen

unread,
May 21, 2024, 6:05:46 AMMay 21
to Ladislav Thon, Quarkus Development mailing list

Hi,

I released Jandex 3.2.0 last week and while the release announcement (
https://smallrye.io/blog/jandex-3-2-0/) contains the information, it's
probably best to also warn everyone through this channel as well.

thanks for the heads Ladislav.

This release increases the persistent index version, due to some new
information available in the index (notably, sealed classes and interfaces

are now supported). This means that older Jandex releases will *not* be

able to read the indexes produced by Jandex 3.2.0.

Quarkus will bump to Jandex 3.2.0 in version 3.12, so components used in

older Quarkus versions should *not* update Jandex.

I can't parse this - you are saying Quarkus will bump to jandex 3.2.0 but components
used in older Quarkus versions should not update Jandex....isn't that all components
in Quarkus you are saying they should not update but they will get updated automatically ?

/max

Max Rydahl Andersen

unread,
May 21, 2024, 6:06:45 AMMay 21
to Stephane Epardaud, lad...@gmail.com, Julien Ponge, Quarkus Development mailing list

Given the rate of change Java is going through it seems fitting to explore ways for jandex to not break this way if feasible.

/max
https://xam.dk/about

On 21 May 2024, at 10:36, Stephane Epardaud wrote:

I don't know if it applies in this case, but there's ways to add data to indexes by changing the format without breaking previous implementations, a bit like the Java Class File Format, where you can add attributes, and the previous implementations that don't know what to do with the attribute will just ignore it.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.

Ladislav Thon

unread,
May 21, 2024, 6:30:56 AMMay 21
to Max Rydahl Andersen, Quarkus Development mailing list
út 21. 5. 2024 v 12:05 odesílatel Max Rydahl Andersen <mand...@redhat.com> napsal:

This release increases the persistent index version, due to some new
information available in the index (notably, sealed classes and interfaces
are now supported). This means that older Jandex releases will *not* be
able to read the indexes produced by Jandex 3.2.0.

Quarkus will bump to Jandex 3.2.0 in version 3.12, so components used in
older Quarkus versions should *not* update Jandex.

I can't parse this - you are saying Quarkus will bump to jandex 3.2.0 but components
used in older Quarkus versions should not update Jandex....isn't that all components
in Quarkus you are saying they should not update but they will get updated automatically ?


No, I'm saying components that ship a Jandex index should only update to Jandex 3.2.0 in versions that are not going to be used in older Quarkus versions.

Is that clear? I honestly don't know how else to put it :-)

LT

Ladislav Thon

unread,
May 21, 2024, 6:31:17 AMMay 21
to Stephane Epardaud, Julien Ponge, Quarkus Development mailing list
út 21. 5. 2024 v 10:36 odesílatel Stephane Epardaud <stephane...@gmail.com> napsal:
I don't know if it applies in this case, but there's ways to add data to indexes by changing the format without breaking previous implementations, a bit like the Java Class File Format, where you can add attributes, and the previous implementations that don't know what to do with the attribute will just ignore it.

I briefly pondered whether it would make sense to move the Jandex persistent index to something like Protobuf, but I didn't want to add a dependency just for this (so far, Jandex core has no runtime dependency, and I'd like to keep it like that). It should be possible to modify the current format to add field IDs (and length, for older versions to be able to skip) prior to data, I guess...

LT

Martin Kouba

unread,
May 21, 2024, 7:12:42 AMMay 21
to lad...@gmail.com, Stephane Epardaud, Julien Ponge, Quarkus Development mailing list
On 21. 05. 24 12:31, Ladislav Thon wrote:
> út 21. 5. 2024 v 10:36 odesílatel Stephane Epardaud
> <stephane...@gmail.com <mailto:stephane...@gmail.com>> napsal:
I don't know if it helps but keep in mind that Quarkus does reindex
a jar if an jandex.idx with an unsupported persistent format is used
(currently we require at least persistent format v8, Jandex 2.1+).

Maybe we should bump the required version in
io.quarkus.deployment.index.IndexingUtil.REQUIRED_INDEX_VERSION?

>
> LT
>
> --
> You received this message because you are subscribed to the Google
> Groups "Quarkus Development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to quarkus-dev...@googlegroups.com
> <mailto:quarkus-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/quarkus-dev/CALbocOnaSKCo7vMJMkeWNMWKPHNqnqkN-KggZtA6C4e22N%2BCBA%40mail.gmail.com <https://groups.google.com/d/msgid/quarkus-dev/CALbocOnaSKCo7vMJMkeWNMWKPHNqnqkN-KggZtA6C4e22N%2BCBA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
Martin Kouba
Principal Software Engineer
Red Hat, Czech Republic

Reply all
Reply to author
Forward
0 new messages