[
https://issues.apache.org/jira/browse/SOLR-18119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18125164#comment-18125164
]
Nick Shanin edited comment on SOLR-18119 at 10/9/26 12:32 AM:
--------------------------------------------------------------
I opened a PR with a pure-Java port of {{changes2html.py}}, for discussion
alongside PR #4999 and PR #5034: [https://github.com/apache/solr/pull/5061].
The second script, {{checkJavadocLinks.py}}, is not ported: a companion PR
removes the crawl instead, because DocLint already validates the javadoc
references at compile time: [https://github.com/apache/solr/pull/5062]. The two
PRs are complements, touch different files, and can merge in either order.
I am willing to refactor other build and tooling dependencies the same way,
porting scripts off external interpreters into JVM-native code, if the project
wants to keep moving in that direction. Point me at the next candidate.
One correction to the first version of this comment. I wrote that the link
checker does not validate fragment anchors and that the Python original has the
same gap. That was wrong: {{checkJavadocLinks.py}} does validate fragment
anchors, and reports {{BROKEN ANCHOR}} when one is missing on a page it scans.
So removing the crawl also removes that anchor checking. Before relying on
that, I measured the current documentation site: 185,623 links with fragments,
0 broken. Restoring anchor validation as its own check is a follow-up I am
happy to do if it is wanted.
AI-generated, human-reviewed text above.
was (Author: JIRAUSER314749):
I opened a PR with a pure-Java port of the two scripts, for discussion
alongside PR #4999 and PR #5034: [https://github.com/apache/solr/pull/5061]
I am willing to refactor other build and tooling dependencies the same way,
porting scripts off external interpreters into JVM-native code, if the project
wants to keep moving in that direction. Point me at the next candidate.
The porting work also caught a pre-existing bug. While porting
{{checkJavadocLinks.py}} I found that the link checker does not validate
fragment anchors for links that resolve: a link to
{{other.html#missing-anchor}} passes as long as {{other.html}} exists. The
Python original has the same gap. PR #5061 preserves the behavior rather than
changing what the checker promises inside a port, and the gap is stated in the
PR's Limits. I am happy to open a follow-up ticket for real anchor validation,
with a site-wide measurement of what it flags on the current documentation, if
that is wanted.
AI-generated, human-reviewed text above.
> Changes.html generation is quietly skipped if python3 not found, can cause
> downstream tasks to fail confusingly
> ----------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-18119
> URL: https://issues.apache.org/jira/browse/SOLR-18119
> Project: Solr
> Issue Type: Bug
> Reporter: Chris M. Hostetter
> Assignee: Jan Høydahl
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h
> Remaining Estimate: 0h
>
> ChangesToHtmlTask will log a warning if python3 doesn't exist – but it does
> not fail.
> downstream tasks that (implicitly) depend on the existence of Changes.html
> will subsequently fail...
>
> {noformat}
> :solr:documentation:checkBrokenLinks
> :solr:solr-ref-guide:checkSiteLinks{noformat}
>
> This can be very confusing on jenkins boxes – such as our Windows jenkins
> build, which does not have python3 – when people don't know/realize that
> {{:solr:documentation:changesToHtml}} quietly did nothing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]