<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi Liam,<br>
thanks for looking into this.</p>
<p>You proposed to generate this message:</p>
<p>
<blockquote type="cite"><font face="monospace">test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.java:38:
error: type annotations are not admissible at this location:
@TA<br>
@TA Outer.SInner osi;<br>
^<br>
(to annotate a qualified type, write Outer.@TA SInner)</font></blockquote>
I have few questions:</p>
<p>* can this error only be issues when there is a bad type
annotation in a qualified type? If not, then the latter part of
the message might be reaching too far<br>
* in other places we have messages like "XYZ not expected here" -
perhaps might be useful to provide more consistent diagnostics<br>
* Not sure about seeing @TA in the error message after "locaton: "
- in the sense that the message seems to suggest that what's
coming next (after the colon) is a location, not the actual
annotation?</p>
<p>Maurizio<br>
</p>
<div class="moz-cite-prefix">On 02/05/2024 18:43, Liam Miller-Cushon
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAL4QsgsAzx_X-kYhhgPM-tW5KGXAwNRh6uvFneJhATkD5BKNaA@mail.gmail.com">
<div dir="ltr">Hi,
<div><br>
</div>
<div>Does anyone on the compiler team have thoughts on this? I'd
welcome any feedback.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Feb 15, 2024 at
6:59 AM Werner Dietl <<a href="mailto:wdietl@gmail.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">wdietl@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Thanks for fixing this issue, Liam!
<div><br>
</div>
<div>The revised diagnostic is much better and including a
suggested fix makes it even more useful.</div>
<div>Like Chris said, this has been a frequent confusion for
people.</div>
<div><br>
</div>
<div>I had a look at the PR in January and it looks good to
me.</div>
<div>There needs to be <a href="https://github.com/openjdk/jdk/pull/16592#discussion_r1444978083" target="_blank" moz-do-not-send="true">some discussion</a>
about whether to use "admissible" or "applicable", but
that's a quick fix.</div>
<div><br>
</div>
<div>I'm not a "R"eviewer, but do hope that we can get this
PR merged. Please let me know if there is anything I can
do to help.</div>
<div><br>
</div>
<div>Best,</div>
<div>cu, WMD.</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Feb 5, 2024 at
7:09 PM Liam Miller-Cushon <<a href="mailto:cushon@google.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">cushon@google.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">Thanks Chris!
<div><br>
</div>
<div>Does anyone else have feedback on the proposal?</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jan 9, 2024
at 8:26 AM Chris Povirk <<a href="mailto:cpovirk@google.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">cpovirk@google.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Thanks, Liam.
<div><br>
</div>
<div>We've found the current error messages to be
a source of confusion: While the average user
doesn't use type-use annotations, those users
who do use them seem to hit this pretty
frequently. We have our own FAQ entry about it
in our internal documentation, and I also refer
people to <a href="https://checkerframework.org/manual/#common-problems-non-typechecking" target="_blank" moz-do-not-send="true">the
Checker Framework's documentation</a>, which
gives advice similar to that implemented by
Liam's PR. I would expect for that page and <a href="https://stackoverflow.com/a/21385939/28465" target="_blank" moz-do-not-send="true">this Stack Overflow
answer</a> to get more traffic as type-use
annotations grow in popularity, as we're aiming
for them to do as part of our work on JSpecify
nullness. The error-message changes could save
users a trip to those docs.</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature"><a href="https://ece.uwaterloo.ca/~wdietl/" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://ece.uwaterloo.ca/~wdietl/</a></div>
</blockquote>
</div>
</blockquote>
</body>
</html>