[
https://issues.apache.org/jira/browse/LUCENE-9711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17275967#comment-17275967
]
Michael McCandless commented on LUCENE-9711:
--------------------------------------------
{quote}So we can't rely on javadoc making a broken link if we screw up the
APIs, ideally we add some explicit detection to the doclet to fail because a
"link had to be greyed-out" ?
{quote}
Ahh, OK, so we were relying on buggy behavior of older JDKs to help us catch
these broken APIs.
It's crazy to me that {{javac}} does not already support this kind of static
checking!
Thanks for digging [~rcmuir]!
> "gradle precommit" no longer catches accidental package-private APIs?
> ---------------------------------------------------------------------
>
> Key: LUCENE-9711
> URL: https://issues.apache.org/jira/browse/LUCENE-9711
> Project: Lucene - Core
> Issue Type: Bug
> Affects Versions: master (9.0)
> Reporter: Michael McCandless
> Priority: Major
> Attachments: look_ma_no_link.png
>
>
> While backporting the new exciting deterministic multi-segment indexing tool,
> LUCENE-9694, {{ant precommit}} failed, because the new {{DocumentSelector}}
> API was accidentally package private, missing its {{public}} modifier.
> [Aside: I sometimes feel we should not put unit tests in the same package as
> the APIs they are testing. We of course do this to make testing internal,
> package-private state, possible/easier. But it then leads to API bugs like
> this, where we fail to make an API public when it should be.]
> Anyways, luckily, the old crazy hacky Python javadoc linter in 8.x caught
> this issue, and I fixed it on backport, and will shortly fix it in mainline
> as well. But {{gradle precommit}} on mainline failed to catch it, I think?
> Is this a known regression in our {{gradle}} migration? Do we have plans to
> somehow recover it? It clearly sometimes catches important API bugs! And
> this is not the first time it's caught such bugs...
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]