Re: [gwt-contrib] Re: Java10 support

2018-04-04 Thread Alexander Leshkin

>
>
>  
>>
>>> Overall, I think most importantly the work shouldn't really be about 
>>> Java 10 per se, but rather preparation for Java 11 (the next LTS release)  
>>> in 6 months and the EOL of Java 8 in 9 months or so. In other words, I, for 
>>> one, don't really care whether GWT supports Java 10 (it should at least 
>>> "run" in Java 10 runtime though), as long as it'll be ready for Java 11.
>>>
>>
>> For now Java 11 only seem to have JEP 323 
>>  which seem relevant for GWT. 
>> Depending on how JDT has implemented the "var" keyword, changes in GWT 
>> compiler might be minimal when adding Java 11 support (assuming Java 10 
>> support is already done).
>>
>>
> My guess it that both JEP 286 and JEP 323 will be transparently handled by 
> JDT requiring no actual changes to GWT. The main issue in general upgrading 
> JDT are changes in type inference which render some valid programs invalid 
> (e.g. last update required a change to daggerhttps://
> github.com/google/dagger/commit/4e74fcefd7bb3b3d2d49a93c4bca39e5eb1c7277) and 
> performance degradation.
>

I tried "var type" with latest JDT RC. And for exact, denotable types GWT 
works fine without any changes in compiler. JDT AST already contains 
inferred type for local variable. E.g.:

var s = "s";
in type binding looks like 
String s = "s";

But for non-denotable types GWT compiler breaks with assertion. E.g. it 
breaks for anonymous local class:
var tuple = new Object(){ int first, second; };

It's because type binding for this declaration looks like:
$Local$ tuple = new Outer$1();

So,it looks like some changes in GWT compiler still have to be made to 
support JEP 286.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/884c9390-7119-4669-ac00-bffc7fab1ad5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: Java10 support

2018-04-04 Thread 'Roberto Lublinerman' via GWT Contributors
On Wed, Apr 4, 2018 at 12:36 AM Alexander Leshkin <
alexander.lesh...@gmail.com> wrote:

But for non-denotable types GWT compiler breaks with assertion. E.g. it
> breaks for anonymous local class:
> var tuple = new Object(){ int first, second; };
>
> It's because type binding for this declaration looks like:
> $Local$ tuple = new Outer$1();
>
> So,it looks like some changes in GWT compiler still have to be made to
> support JEP 286.
>

In any  case, I don't expect the compiler changes to be significant. There
are no new abstraction to be introduced nor structural changes. Could you
start adding tests to GwtAstBuilderTest for these cases, even if they have
to be disabled or commented out.

BTW, which assertion is failing, is it one in JProgram.createLocal?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAC7T7gk2y7mx-5bFJ36ifBFoJopUeiM498zmp7_XhY0e3FODcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.