I share the same opinion. Infact hadoop (from which our annotations are
derived I believe), talks about this, "Also, certain APIs are annotated as
@VisibleForTesting (from com.google.common .annotations.VisibleForTesting)
- these are meant to be used strictly for unit tests and should be treated
as “Private” APIs."

https://hadoop.apache.org/docs/r3.1.2/hadoop-project-dist/hadoop-common/InterfaceClassification.html

On Mon, Jun 22, 2020 at 10:15 AM Sean Busbey <bus...@apache.org> wrote:

> Yeah I would say no as well. We should make clear on our dev guide that you
> also should be marking those things with an Interface Audience marking if
> you don't intend them to be at the downstream API visibility of the parent
> class.
>
> (IIRC we also use VisibleForTesting in IA.Private classes to proactively
> explain why some internal looking member is at a wider Java access scope.)
>
> On Mon, Jun 22, 2020, 11:39 Nick Dimiduk <ndimi...@apache.org> wrote:
>
> > Hello,
> >
> > This came up over on the 2.3.0RC0 thread, so let's open it for proper
> > discussion. In that context, we observe method signature changes to a
> > method marked with the Guava VisibleForTesting annotation. The method is
> a
> > protected method on a IA.Public class. There is no method-level IA
> > annotation.
> >
> > Do we consider the VisibleForTesting annotation as a specifier for our
> > compatibility guidelines?
> >
> > I am of the opinion that no, it is not an InterfaceAudience annotation,
> and
> > so it is not applicable for defining our public API.
> >
> > What do you think?
> >
> > Thanks,
> > Nick
> >
>

Reply via email to