docs: fix broken external and internal links in Groovydocs#15327
docs: fix broken external and internal links in Groovydocs#15327sanjana2505006 wants to merge 1 commit intoapache:7.0.xfrom
Conversation
|
A small number of residual 'broken' links remain (approx. 30 reports). |
|
@sanjana2505006 Thank you. On this issue would it be possible to use the python scripts to identify the source of the broken link and fix them either in the javadoc/groovy doc in each .groovy or .java file and Gradle configuration for the build? This is preferable to having a script fix them each time the project is built. After that, if we still need to have a script, since our project is based on the Groovy programming language we prefer Groovy Scripts vs Python scripts. I don't think this should be need though, if we fix the root sources of the broken links. The broken references just built up over the last 20 years as the whole Java ecosystem has evolved significantly. |
596f765 to
8df9833
Compare
|
@jamesfredley Thank you for the clarification. I’ve updated the PR to align with your suggestions. I’ve also squashed everything into a single commit. The docs now build cleanly with improved link resolution using the project’s native tooling. |
|
@jamesfredley Whenever you get a chance, please review and let me know if any changes are needed |
|
Hello @jamesfredley, just a gentle follow-up on this PR. Whenever you have time, could you please share your feedback or let me know if any further changes are needed from my side? Happy to update anything required. Thank you |
8df9833 to
5f0ecad
Compare
This comment has been minimized.
This comment has been minimized.
|
There are license failures on this branch and unnecessary formatting to |
|
@jdaugherty I've updated the PR, please take a look whenever you get a chance and let me know if there's anything else that needs to be changed. |
| gdoc.outputs.dir(gdoc.destinationDir) | ||
| } | ||
|
|
||
| def fixGroovydocLinks = tasks.register('fixGroovydocLinks', FixGroovydocLinksTask) { |
There was a problem hiding this comment.
It's fine to write a task to help identify bad links, but we shouldn't be "patching" our docs like this. We should fix the source issue. The task needs to be changed to an audit task or even a build failure that can be triggered via a separate CI (like we do CI or the version mismatches)
There was a problem hiding this comment.
I've converted the task into an audit-only check that fails the build (via -PauditGroovydocLinks) instead of patching the HTML.
There was a problem hiding this comment.
No reason to use a property to control behavior. Let's just use a task that's well named?
| * | ||
| * @author Troy Heninger | ||
| * @author Graeme Rocher | ||
| * |
There was a problem hiding this comment.
The formatting changes to this file are unnecessary and should be reverted.
There was a problem hiding this comment.
I've reverted the unrelated formatting changes and squashed everything into a single clean commit. Let me know what you think!
|
You're right that patching generated docs is a workaround; ideally, we'd fix the source Groovydoc generation to avoid bad links. To change this to an audit task that fails the build on bad links, add an audit mode to the task that throws an exception instead of fixing. This allows CI to catch issues early. build-logic/docs-core/src/main/groovy/org/grails/doc/gradle/FixGroovydocLinksTask.groovy grails-doc/build.gradle |
✅ All tests passed ✅🏷️ Commit: 35c896e Learn more about TestLens at testlens.app. |
35c896e to
afa0d94
Compare
afa0d94 to
b635d9b
Compare
Changes i did:
Surgical Link Correction: Modernized the
docs-dependencies.gradleresolution logic and added a professional post-processing script (
fix_groovydoc_links.py) to repair malformed relative paths for inner classes and map 20+ external API roots (Spring, Hibernate, Jakarta, GORM, etc.).Verification Tooling: Included a parallelized
check_links.pyutility for high-speed documentation validation.This PR fixes issue #14991