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

upgrade commons codec from 1.13.0 to 1.16.0 #13269

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rmuir
Copy link
Member

@rmuir rmuir commented Apr 4, 2024

Currently, we depend upon a pre-COVID version of commons-codec (like several other dependencies, I am working the issues).

Upgrade to 1.16.0.

NOTE: I'm unable to upgrade to 1.16.1: it causes test failures.

   $ ./gradlew -p lucene/analysis/phonetic test
   ...
   >     java.lang.ExceptionInInitializerError
   >         at [email protected]/org.apache.commons.codec.language.bm.Lang.<clinit>(Lang.java:108)
   >         at [email protected]/org.apache.commons.codec.language.bm.PhoneticEngine.<init>(PhoneticEngine.java:300)
   >         at [email protected]/org.apache.commons.codec.language.bm.PhoneticEngine.<init>(PhoneticEngine.java:276)
             ...
   >
   >         Caused by:
   >         java.lang.IllegalArgumentException: Unable to resolve required resource: org/apache/commons/codec/language/bm/ash_languages.txt
   >             at [email protected]/org.apache.commons.codec.Resources.getInputStream(Resources.java:38)
   >             at [email protected]/org.apache.commons.codec.language.bm.Languages.getInstance(Languages.java:254)
   >             at [email protected]/org.apache.commons.codec.language.bm.Languages.<clinit>(Languages.java:243)

Seems some resources are missing from the jar or similar.
I tried to investigate a bit, by looking at their source code changes from 1.16.0 to 1.16.1, it is overwhelming, not exactly what I'd call a "patch" release :)

apache/commons-codec@rel/commons-codec-1.16.0...rel/commons-codec-1.16.1

Either way, that isn't to be fixed here, so let's at least move from a 2019 version to a 2023 version. We can separately debug the 1.16.1 issue / report it to them / file a PR /etc.

@rmuir
Copy link
Member Author

rmuir commented Apr 4, 2024

I think i understand the 1.16.1 issue. Looks like there is a bit of jar/maven-hell going on among the commons dependencies. I hit it when I tried to upgrade commons-compress...

Bumping both of them to the latest version is not the solution, it seems to then just cause "module-hell" and still fails the build. But for now we can get them on less ancient versions.

@rmuir
Copy link
Member Author

rmuir commented Apr 4, 2024

I will open a separate issue for the commons-compress as there is more trouble there...

Copy link

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant