You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title: Add Module Support for OkHttp to Improve Compatibility with jlink and Java 9+ Modules
Description:
I am currently working on a project using OkHttp (version 4.x / 5.0.0-alpha.14) and encountered an issue while trying to create a modular application in a Java 9+ environment using jlink. The problem stems from the fact that OkHttp does not declare its own module via a module-info.java file, which leads to compatibility issues with the Java Platform Module System (JPMS).
The absence of module declarations in OkHttp causes errors during jlink modular application creation, as OkHttp internally uses modules (such as okio), but it does not provide explicit module definitions, resulting in runtime conflicts and build failures.
Suggested Solution:
I recommend adding official module support to OkHttp as follows:
Add module-info.java:
Include a module-info.java file in the OkHttp repository, declaring the necessary modules. For example:
module okhttp {
requires java.net.http; // if OkHttp uses Java's HTTP-related API
requires okio; // OkHttp depends on Okio
exports okhttp3; // export the relevant packages (adjust based on OkHttp's internal structure)
}
Ensure Compatibility with JPMS:
Ensure that OkHttp works seamlessly with the Java Platform Module System (JPMS) and can function correctly in modular applications, especially when using the jlink build tool.
Provide a Version with Module Support:
If full module support cannot be achieved immediately, would it be possible to provide a clear roadmap or plan to help users understand the progress on module support and avoid issues when migrating to modular Java applications?
Background:
Currently, OkHttp does not declare any modules. While it works fine with JDK 8 and earlier versions, the lack of module support becomes problematic in Java 9+ environments, particularly when using jlink for creating custom Java runtimes. This issue is especially prominent because jlink requires all dependencies to have clear module declarations.
Expected Outcome:
By adding module support for OkHttp, developers will be able to:
Avoid issues when building custom runtimes using jlink.
Integrate OkHttp more easily into modular Java applications, improving compatibility with JDK 9+.
Prevent runtime conflicts and improve overall performance for modular applications using OkHttp.
Thanks: Thank you for considering this request. I believe that adding module support for OkHttp will greatly improve its usability in modern modular Java applications.
This version is ready for submission. Let me know if you’d like to make any changes or need further adjustments!
The text was updated successfully, but these errors were encountered:
Title: Add Module Support for OkHttp to Improve Compatibility with
jlink
and Java 9+ ModulesDescription:
I am currently working on a project using OkHttp (version 4.x / 5.0.0-alpha.14) and encountered an issue while trying to create a modular application in a Java 9+ environment using
jlink
. The problem stems from the fact that OkHttp does not declare its own module via amodule-info.java
file, which leads to compatibility issues with the Java Platform Module System (JPMS).The absence of module declarations in OkHttp causes errors during
jlink
modular application creation, as OkHttp internally uses modules (such asokio
), but it does not provide explicit module definitions, resulting in runtime conflicts and build failures.Suggested Solution:
I recommend adding official module support to OkHttp as follows:
module-info.java
:Include a
module-info.java
file in the OkHttp repository, declaring the necessary modules. For example:Ensure Compatibility with JPMS:
Ensure that OkHttp works seamlessly with the Java Platform Module System (JPMS) and can function correctly in modular applications, especially when using the
jlink
build tool.Provide a Version with Module Support:
If full module support cannot be achieved immediately, would it be possible to provide a clear roadmap or plan to help users understand the progress on module support and avoid issues when migrating to modular Java applications?
Background:
Currently, OkHttp does not declare any modules. While it works fine with JDK 8 and earlier versions, the lack of module support becomes problematic in Java 9+ environments, particularly when using
jlink
for creating custom Java runtimes. This issue is especially prominent becausejlink
requires all dependencies to have clear module declarations.Expected Outcome:
By adding module support for OkHttp, developers will be able to:
jlink
.Thanks: Thank you for considering this request. I believe that adding module support for OkHttp will greatly improve its usability in modern modular Java applications.
This version is ready for submission. Let me know if you’d like to make any changes or need further adjustments!
The text was updated successfully, but these errors were encountered: