Skip to content

Avoid using Modulepath in Javadoc plugin #2579

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

Closed
mp911de opened this issue May 19, 2025 · 1 comment
Closed

Avoid using Modulepath in Javadoc plugin #2579

mp911de opened this issue May 19, 2025 · 1 comment
Assignees
Labels
type: task A general task

Comments

@mp911de
Copy link
Member

mp911de commented May 19, 2025

Java 23

Error while generating Javadoc: 
[ERROR] Exit code: 1
[ERROR] /Users/mark/.m2/repository/io/reactivex/rxjava3/rxjava/3.1.10/rxjava-3.1.10.jar(/io/reactivex/rxjava3/core/Single.class): error: Cannot attach type annotations @io.reactivex.rxjava3.annotations.NonNull,@io.reactivex.rxjava3.annotations.NonNull,@io.reactivex.rxjava3.annotations.NonNull,@io.reactivex.rxjava3.annotations.NonNull to Single.concat:
[ERROR]   class file for org.reactivestreams.Publisher not found
[ERROR] /Users/mark/.m2/repository/io/reactivex/rxjava3/rxjava/3.1.10/rxjava-3.1.10.jar(/io/reactivex/rxjava3/core/Flowable.class): error: Cannot attach type annotations @io.reactivex.rxjava3.annotations.NonNull to Flowable.blockingSubscribe:
[ERROR]   class file for org.reactivestreams.Subscriber not found
[ERROR] 2 errors
[ERROR] Command line was: javadoc -J-Duser.language= -J-Duser.country= @options @packages

Java 22

 error: class file for org.reactivestreams.Publisher not found
[ERROR] 1 error
[ERROR] Command line was: javadoc -J-Duser.language= -J-Duser.country= @options @packages

Java 21

[WARNING] Javadoc Warnings
[WARNING] warning: The code being documented uses modules but the packages defined in https://reactivex.io/RxJava/3.x/javadoc/ are in the unnamed module.
[WARNING] 1 warning

This error happens when a dependency defines a module descriptor but their transitive dependency does not. Using Javadoc legacyMode helps to resort to classpath mode to overcome this utterly broken library state.

@mp911de mp911de changed the title Remove Javadoc downgrade to source level Use release instead of source for Javadoc configuration May 19, 2025
@mp911de mp911de added type: task A general task and removed status: waiting-for-triage labels May 19, 2025
@mp911de mp911de added this to the 4.0 M4 (2025.1.0) milestone May 19, 2025
mp911de added a commit that referenced this issue May 19, 2025
An increasing number of libraries starts shipping module info without having their dependencies providing module-info. That is causing a lot of downstream effects and we do not want therefore Javadoc using modulepath.

See #2579
@mp911de mp911de changed the title Use release instead of source for Javadoc configuration Avoid using Modulepath in Javadoc plugin May 19, 2025
@mp911de mp911de self-assigned this May 19, 2025
@sbrannen
Copy link
Member

Using Javadoc legacyMode helps to resort to classpath mode to overcome this utterly broken library state.

I'm not familiar with that legacyMode, but the JDK team introduced a --link-modularity-mismatch option for javadoc in JDK 18 indirectly per my request for such a feature.

https://github.com/spring-projects/spring-framework/blob/094e653746b69f3d4ada4bfd9f5e03744d7c6576/framework-api/framework-api.gradle#L41-L43

I see you have already closed this issue, but perhaps that -link-modularity-mismatch info option will help to address modularity issues with javadoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

3 participants