Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide details about failing MetaInfJandexReader #28125

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

damienb-opt
Copy link
Contributor

@damienb-opt damienb-opt commented Sep 21, 2022

reader.getIndexVersion() can throw UnsupportedVersion too

Example:

Build step io.quarkus.deployment.index.ApplicationArchiveBuildStep#build threw an exception: org.jboss.jandex.UnsupportedVersion: Can't read index version 11; this IndexReader only supports index versions 2-3,6-10
        at org.jboss.jandex.IndexReader.initReader(IndexReader.java:87)
        at org.jboss.jandex.IndexReader.readVersion(IndexReader.java:140)
        at org.jboss.jandex.IndexReader.getIndexVersion(IndexReader.java:127)
        at io.quarkus.deployment.index.IndexingUtil$MetaInfJandexReader.apply(IndexingUtil.java:244)
        at io.quarkus.deployment.index.IndexingUtil$MetaInfJandexReader.apply(IndexingUtil.java:230)
        at io.quarkus.paths.PathTreeVisit.process(PathTreeVisit.java:40)

@gsmet gsmet requested a review from Ladicek September 21, 2022 12:38
@Ladicek
Copy link
Contributor

Ladicek commented Sep 21, 2022

Hmm, technically Jandex wouldn't really have to do this and could check the version lazily. But even if we fixed that now, the older versions would still check the version eagerly. The change in this PR looks good. I'm not sure if we like merge commits in the PRs, I'll defer to @gsmet judgement on that :-)

@damienb-opt
Copy link
Contributor Author

Poor PR on my side, don't know why I was not on the right HEAD. Let me try to fix that.

@gsmet
Copy link
Member

gsmet commented Sep 21, 2022

@Ladicek no we don't, they make backporting harder :)

reader.getIndexVersion() can throw UnsupportedVersion too
Example: 
Build step io.quarkus.deployment.index.ApplicationArchiveBuildStep#build threw an exception: org.jboss.jandex.UnsupportedVersion: Can't read index version 11; this IndexReader only supports index versions 2-3,6-10
        at org.jboss.jandex.IndexReader.initReader(IndexReader.java:87)
        at org.jboss.jandex.IndexReader.readVersion(IndexReader.java:140)
        at org.jboss.jandex.IndexReader.getIndexVersion(IndexReader.java:127)
        at io.quarkus.deployment.index.IndexingUtil$MetaInfJandexReader.apply(IndexingUtil.java:244)
        at io.quarkus.deployment.index.IndexingUtil$MetaInfJandexReader.apply(IndexingUtil.java:230)
        at io.quarkus.paths.PathTreeVisit.process(PathTreeVisit.java:40)
@damienb-opt
Copy link
Contributor Author

Ok got it: main moves too fast, and the gymkhana between the 3 repos for a 2 lines fix is huge. Should be ok now, won't do a non-rebase merge, my bad using default options ^^;

@Ladicek
Copy link
Contributor

Ladicek commented Sep 21, 2022

Indeed main moves fast, but the PR doesn't always have to be absolutely totally up to date, we wouldn't be able to merge anything with such policy :-) Thanks!

@gsmet
Copy link
Member

gsmet commented Sep 21, 2022

Yeah, if there's no conflicts and the PR is not massive, we're fine merging it even if not totally up to date.

@damienb-opt
Copy link
Contributor Author

Little context for my PR: Gradle project, with a non-quarkus subproject, I use https://github.com/kordamp/jandex-gradle-plugin to generate the Jandex index at build time for that subproject. This Gradle plugin uses Jandex 3 with index version 11. Given the project rhythm, and the fact I hadn't made a package for weeks, it took me hours to remember that and track the cultprit.

@gsmet
Copy link
Member

gsmet commented Sep 21, 2022

@damienb-opt perfectly understandable. As for the Gradle plugin, you should upgrade to 1.0.0 only when you upgrade to Quarkus 2.14.0.Final (our next one is 2.13.0.Final released in a week, 2.14.0.Final will be released ~ a month after that), which upgrades Jandex to 3.

Until then keep the pre-1.0.0 version.

@gastaldi gastaldi merged commit 6649e34 into quarkusio:main Sep 22, 2022
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Sep 22, 2022
@damienb-opt damienb-opt deleted the patch-1 branch September 22, 2022 08:04
@gsmet gsmet modified the milestones: 2.14 - main, 2.13.1.Final Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants