-
-
Notifications
You must be signed in to change notification settings - Fork 3k
chore: bump-okhttp-4.12.0-to-5.0.0 #13521
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
Merged
koppor
merged 4 commits into
JabRef:main
from
Munhangyeol:chore/bump-okhttp-4.12.0-to-5.0.0
Jul 11, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9a70d8b
chore: bump-okhttp-4.12.0-to-5.0.0
Munhangyeol aace5c7
Discard changes to jabkit/src/test/java/org/jabref/cli/ArgumentProces…
koppor 5e07ec7
Update build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-…
Munhangyeol 3d32f6e
Merge branch 'main' into chore/bump-okhttp-4.12.0-to-5.0.0
koppor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, now two modules have the same name - see line 149.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your concern. Even though two modules are assigned the same name here, there is no actual conflict because they refer to completely separate artifacts (okhttp vs. okhttp-jvm).
This duplication is currently necessary because some dependencies (such as langchain4j-hugging-face) still require the legacy okhttp artifact, while our project relies on the newer okhttp-jvm from OkHttp 5.x.
Since the Java Module System (JPMS) treats them as distinct jars, and as long as both modules are not loaded into the same named module path, this setup works without any issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's anything wrong or anything I should fix in what I said, please feel free to let me know :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My gut feeling says that overloaded module names will cause issues. Especially when we will switch to use modules as the primary source of dependencies: https://github.com/gradlex-org/java-module-dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overloaded module names could definitely cause issues, especially if we move towards using modules as the primary way of managing dependencies in the future.
I’ll try to look into this and hopefully resolve it by tomorrow or the day after. Please feel free to let me know if there’s anything I missed or should improve!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the dependency tree with the dependencies task, and you're right.
Gradle resolves okhttp to version 5.0.0 automatically because of other dependencies or version conflicts.
However, since langchain4j-hugging-face still relies on the 4.x API, upgrading to 5.0.0 breaks compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does a separte module name help to avoid module name overloading?
The modules will be on the same path - as JabRef needs all of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current situation, module name conflicts are unavoidable, and using separate module names alone does not fundamentally resolve the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
com.squareup.okhttp3:okhttpis not really a module anymore. The Jar is more or less empty now. This is Kotlin multi-platform stuff.I think it does not end up the Module Path, but is needed by the mechanism that looks at the metadata to create the missing
module-infofiles. That the checks are passing on this PR indicates that everything is ok.I know that it looks like the name is used twice, but in practice only one of the Jars is used. It's confusing but its Kotlin Multi-Platform libraries "clashing" with JPMS. Maybe add a comment about this to the
module("com.squareup.okhttp3:okhttp", "okhttp3")line.We have a similar situation here with
kotlinpoet:https://github.com/hiero-ledger/hiero-gradle-conventions/blob/main/src/main/kotlin/org.hiero.gradle.base.jpms-modules.gradle.kts#L156-L157
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
okhttp3is correct because the MANIFEST ofcom.squareup.okhttp3:okhttp-jvmcontains