Aligning compiler messages for using preview API with preview language features?
Jim Laskey
james.laskey at oracle.com
Wed Jul 3 12:48:19 UTC 2019
Clarity always helps.
> On Jul 2, 2019, at 9:33 PM, Joe Darcy <joe.darcy at oracle.com> wrote:
>
> Hello,
>
> As a follow-up to some recent work ("Improving compiler messages for preview API " [1]), I wanted to get some feedback on a possible variation of the work to align the messages for using preview API elements and using preview language features.
>
> Assuming some mechanism to implement a predicate identifying a preview API (presence of an annotation, side table in the compiler, etc.), the messages for preview APIs could be routed through the same previewHandler used to process preview language features.
>
> The summary message
>
> Note: Test.java uses preview language features.
> Note: Recompile with -Xlint:preview for details.
>
> could then be replaced with something like
>
> Note: Test.java uses preview language features and/or preview API elements.
> Note: Recompile with -Xlint:preview for details.
>
> or more specialize variants for the particular combinations of a least one flavor of preview functionality being used.
>
> Comments?
>
> Thanks,
>
> -Joe
>
> [1] https://mail.openjdk.java.net/pipermail/compiler-dev/2019-June/013498.html
>
More information about the compiler-dev
mailing list