Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-22 Thread Magnus Ihse Bursie
On 2019-10-16 14:55, Erik Joelsson wrote: Build change looks good now. I agree. /Magnus /Erik On 2019-10-16 05:50, Jan Lahoda wrote: Hi, An updated patch is here: http://cr.openjdk.java.net/~jlahoda/8226585/webrev.02/ Changes in the update: -added the dependency into the makefiles

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-18 Thread Maurizio Cimadamore
Sorry, I got the table in the CSR completely mixed up. So, the new behavior only really changes the fact that essential API warnings are now suppressible when using --enable-preview. I now see the relevant difference in Check.java. Looks good Maurizio On 18/10/2019 13:38, Jan Lahoda wrote:

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-18 Thread Jan Lahoda
18. října 2019 14:05:45 SELČ, Maurizio Cimadamore napsal: >Looks good - but I suggest garbage collecting the isEssentialAPI() from > >the @PreviewFeature annotation, as the new behavior effectively removes > >any distinctions between the two (unless I miss something). I am afraid there is

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-18 Thread Maurizio Cimadamore
Looks good - but I suggest garbage collecting the isEssentialAPI() from the @PreviewFeature annotation, as the new behavior effectively removes any distinctions between the two (unless I miss something). Maurizio On 16/10/2019 13:50, Jan Lahoda wrote: Hi, An updated patch is here:

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-16 Thread Alex Buckley
On 10/16/2019 5:50 AM, Jan Lahoda wrote: -loosened the handling of essential preview APIs when --enable-preview and @SuppressWarnings is applied - there is no warning for the essential APIs (as there is no warning in such a case for non-essential APIs). This is per the discussion in the CSR:

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-16 Thread Erik Joelsson
Build change looks good now. /Erik On 2019-10-16 05:50, Jan Lahoda wrote: Hi, An updated patch is here: http://cr.openjdk.java.net/~jlahoda/8226585/webrev.02/ Changes in the update: -added the dependency into the makefiles -loosened the handling of essential preview APIs when

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-16 Thread Jan Lahoda
Hi, An updated patch is here: http://cr.openjdk.java.net/~jlahoda/8226585/webrev.02/ Changes in the update: -added the dependency into the makefiles -loosened the handling of essential preview APIs when --enable-preview and @SuppressWarnings is applied - there is no warning for the essential

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-10 Thread Maurizio Cimadamore
The javac changes looks good. I guess I would have preferred to move the check for preview from Check to Preview, and also create a tighter integration between PreviewFeature.Feature and javac's Feature enum, so that we could generate tight error messages, but I guess we can also do that as a

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-09 Thread Erik Joelsson
Oh, you are absolutely correct, the dependency is missing. We need something like this inside "define SetupInterimModule": $$(BUILD_$1.interim): $(COPY_PREVIEW_FEATURES) /Erik On 2019-10-09 01:42, Magnus Ihse Bursie wrote: I can’t see how the compilation is dependent on the copy being

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-09 Thread Magnus Ihse Bursie
I can’t see how the compilation is dependent on the copy being finished. Since Erik contributed this it will probably be correct :) but I’d appreciate an explanation on how this dependency is guaranteed. Or maybe I’m misunderstanding what this is supposed to do? /Magnus > 8 okt. 2019 kl.

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-08 Thread Erik Joelsson
Build changes look good. /Erik On 2019-10-08 08:27, Jan Lahoda wrote: Thanks for the new code Erik! A new webrev/patch that includes this better way of copying is here: http://cr.openjdk.java.net/~jlahoda/8226585/webrev.01/ Any feedback is welcome! Thanks,     Jan On 03. 10. 19 18:06, Erik

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-08 Thread Jan Lahoda
Thanks for the new code Erik! A new webrev/patch that includes this better way of copying is here: http://cr.openjdk.java.net/~jlahoda/8226585/webrev.01/ Any feedback is welcome! Thanks, Jan On 03. 10. 19 18:06, Erik Joelsson wrote: Hello Jan, The build change looks ok, but I would

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-07 Thread Jan Lahoda
Hi Joe, Thanks for the suggestion, but I don't think we can do it using Taglets - as far as I know, Taglets cannot add tabs to the method listing. We would either need to modify javadoc, or (maybe) have a special doclet for JDK documentation. Jan On 04. 10. 19 7:08, Joe Darcy wrote: Hi

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-03 Thread Joe Darcy
Hi Jan, For future work, consider having a "Preview Methods" tag alongside static, instance, deprecated, etc. Cheers, -Joe On 10/3/2019 2:57 AM, Jan Lahoda wrote: Hi, This is a continuation of Joe's patch from here:

Re: RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-03 Thread Erik Joelsson
Hello Jan, The build change looks ok, but I would recommend this construct for copying the file instead: $(eval $(call SetupCopyFiles, COPY_PREVIEW_FEATURES, \     FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/PreviewFeature.java, \     DEST :=

RFR: JDK-8226585: Improve javac messages for using a preview API

2019-10-03 Thread Jan Lahoda
Hi, This is a continuation of Joe's patch from here: https://mail.openjdk.java.net/pipermail/compiler-dev/2019-June/013498.html APIs associated with preview features are split into two groups: essential and non-essential. These are marked with an JDK-internal annotation, PreviewFeature, and a