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

Links to Framework and Servlet Javadoc from Framework's Kotlin API documentation are broken #32797

Closed
wilkinsona opened this issue May 11, 2024 · 5 comments
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Milestone

Comments

@wilkinsona
Copy link
Member

wilkinsona commented May 11, 2024

Affects: 6.0.x and 6.1.x

When the Kotlin API documentation links to types and methods in the Java API, those links are broken.

For example, https://docs.spring.io/spring-framework/docs/6.0.x/kdoc-api/spring-beans/org.springframework.beans.factory/index.html links to https://docs.spring.io/spring-framework/docs/6.0.x/kdoc-api/spring-beans/org.springframework.beans.factory/-listable-bean-factory/index.html which 404s.

5.3.x is not affected where, for example, https://docs.spring.io/spring-framework/docs/5.3.x/kdoc-api/spring-beans/org.springframework.beans.factory/index.html links to https://docs.spring.io/spring-framework/docs/5.3.x/javadoc-api/org/springframework/beans/factory/ListableBeanFactory.html.

We had the same problem in Spring Boot's Kotlin API documentation and fixed it by configuring the package list URL to point to the element list for the Java API. We're using Dokkatoo, but perhaps a similar fix is possible with the Dokka Gradle plugin.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 11, 2024
@sbrannen sbrannen added type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels May 12, 2024
@sbrannen sbrannen added this to the 6.1.7 milestone May 12, 2024
@sbrannen sbrannen added the for: backport-to-6.0.x Marks an issue as a candidate for backport to 6.0.x label May 12, 2024
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-6.0.x Marks an issue as a candidate for backport to 6.0.x labels May 12, 2024
@sbrannen sbrannen self-assigned this May 12, 2024
@sbrannen
Copy link
Member

sbrannen commented May 12, 2024

Indeed, when running the :spring-beans:dokkaHtmlPartial Gradle task on 6.1.x, we see the following error.

Failed to download package-list from https://docs.spring.io/spring-framework/docs/current/javadoc-api/package-list, this might suggest that remote resource is not available, module is empty or dokka output got corrupted

Thanks for reporting this!

I'm looking into it.


We see the same kind of error for the Servlet API.

Failed to download package-list from https://javadoc.io/doc/jakarta.servlet/jakarta.servlet-api/latest/package-list, this might suggest that remote resource is not available, module is empty or dokka output got corrupted

@aSemy
Copy link

aSemy commented May 12, 2024

Looks like the link has changed:

IIRC the default name changed in a newer Java version.

I just wanted to highlight this because it's a common problem. Maybe there's a way it can be made better on the Dokka side?

@sbrannen

This comment was marked as resolved.

@sbrannen sbrannen changed the title Links to Framework's Java API documentation from its Kotlin API documentation are broken Links to Framework and Servlet Javadoc from Framework's Kotlin API documentation are broken May 12, 2024
sbrannen added a commit that referenced this issue May 12, 2024
This commit fixes links from Spring Framework's Dokka HTML to Javadoc
for Spring Framework and Servlet APIs by explicitly configuring the
`element-list` page as the `package-list` in the Dokka Gradle plugin.

Closes gh-32797

(cherry picked from commit 7536980)
@aSemy
Copy link

aSemy commented May 12, 2024

@aSemy, we are aware of the changes regarding package-list and element-list.

Andy in fact already mentioned that in this issue's description.

In light of that, there is no need to repeat that information in the comments.

Hi @sbrannen, your moderation doesn't seem to align with the contribution guidelines.

Reporting an issue or making a feature request is a great way to contribute. Your feedback and the conversations that result from it provide a continuous flow of ideas.

The information might have been clear to you, but wasn't clear to me. The original comment does not say that the link has changed. Rephrasing it and asking relevant question provides a continuous flow of ideas, and helps with others in the future should they come across this issue.

@sbrannen
Copy link
Member

Hi @aSemy,

Thanks for the feedback.

your moderation doesn't seem to align with the contribution guidelines.

Reporting an issue or making a feature request is a great way to contribute. Your feedback and the conversations that result from it provide a continuous flow of ideas.

I don't think my moderation conflicts with our contribution guidelines or code of conduct.

Part of our job as maintainers is to hide comments that we feel are outdated, off-topic, or resolved, and that's what I did here.

Hidden comments remain in place and can still be viewed by anyone interested in reading them.

The original comment does not say that the link has changed.

That's correct: the original comment does not explicitly state that the link has changed.

But it does state that the Spring Boot team was able to fix the same issue "by configuring the package list URL to point to the element list for the Java API," and the linked configuration does exactly that -- both of which imply that that the link has changed.

The information might have been clear to you, but wasn't clear to me.
...
Rephrasing it and asking relevant question provides a continuous flow of ideas, and helps with others in the future should they come across this issue.

Fair enough. In light of that, I have unhidden your comment so that others can view it without having to click on it.

Cheers,

Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

4 participants