Re: [gwt-contrib] Re: Java10 support

2018-04-10 Thread Alexander Leshkin

On Tuesday, April 10, 2018 at 8:21:59 PM UTC+3, Roberto Lublinerman wrote:
>
> On Mon, Apr 9, 2018 at 11:19 PM Alexander Leshkin  > wrote:
>
>> I'm stuck with a few issues in JDT compiler those make not possible to 
>> launch "super sourced" tests at source level >= 9.
>> So, I have to first make patches for JDT and create custom JDT build 
>> before proceeding with patch for JEP286.
>>
>
> Hmm. One option is to wait till JDT stabilizes. The required patches are 
> probably going to be part 4.8M7 (or whatever follows the M6). For testing 
> purposes you could use  
> http://download.eclipse.org/eclipse/downloads/drops4/I20180409-2000/ or 
> the latest or more stable integration build which contains the patches but 
> you are probably using this one judging from the commit you are referencing 
> at the end.
>

I'm currently 
using 
http://download.eclipse.org/eclipse/downloads/drops4/M-4.7.3aRC2-201803300640. 
The 4.7.3a must be the first stable JDT release with Java10 support.
I thought that after release it could be used for Java10 support in GWT 
compiler. But now it seems that JDT patch will not landed in 4.7.3a 
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=532913#c15).
So, probably, I'll switch to 4.8M.

 
>
>> The second issue is a bug with handling Deprecated annotation that was 
>> introduced in 
>> https://github.com/eclipse/eclipse.jdt.core/commit/79d5afecf5f237634a5562279fdceca6591b2b58
>> .
>> This issue leads to AIOOBE when there is an annotation marked as 
>> Deprecated. I noticed this issue for GwtScriptOnly annotation.
>>
>
> Intermediate builds of JDT are normally quite fragile, I wouldn't be 
> surprised if this is the case. Just out of curiosity what is it stack trace 
> for this failure? Might it have been triggered by a changed assumption in 
> JDT?
>

This one is definitely an issue in JDT. It's not a GWT compiler issue. I 
see the same exception in Eclipse java editor for reproducible code snippet.
Anyway, here is the stack trace:

java.lang.ArrayIndexOutOfBoundsException: 3
at 
org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding.addStandardAnnotations(AnnotationBinding.java:82)
at 
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.retrieveAnnotations(BinaryTypeBinding.java:1586)
at 
org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.getAnnotations(ReferenceBinding.java:993)
at 
org.eclipse.jdt.internal.compiler.problem.ProblemReporter.lambda$3(ProblemReporter.java:1822)
at 
org.eclipse.jdt.internal.compiler.problem.ProblemReporter$$Lambda$2/1844381234.get(Unknown
 
Source)
at 
org.eclipse.jdt.internal.compiler.problem.ProblemReporter.deprecatedSinceValue(ProblemReporter.java:1841)
at 
org.eclipse.jdt.internal.compiler.problem.ProblemReporter.deprecatedType(ProblemReporter.java:1822)
at 
org.eclipse.jdt.internal.compiler.problem.ProblemReporter.deprecatedType(ProblemReporter.java:1808)
at 
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.checkAndRecordImportBinding(CompilationUnitScope.java:960)
at 
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:471)
at 
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:501)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:878)
at 
com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:283)
at 
org.eclipse.jdt.internal.compiler.Compiler.processCompiledUnits(Compiler.java:568)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:468)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:419)
at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:1019)
at 
com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:322)
at 
com.google.gwt.dev.javac.CompilationStateBuilder.doBuildGeneratedTypes(CompilationStateBuilder.java:616)
at 
com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.addGeneratedTypes(CompilationStateBuilder.java:225)
at 
com.google.gwt.dev.javac.CompilationState.addGeneratedCompilationUnits(CompilationState.java:127)
at 
com.google.gwt.dev.javac.StandardGeneratorContext.finish(StandardGeneratorContext.java:551)
at 
com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:526)
at 
com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)
at 
com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)
at 
com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)
at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
at 
com.google.gwt.dev.jjs.ast.JC

Re: [gwt-contrib] Re: Java10 support

2018-04-10 Thread 'Roberto Lublinerman' via GWT Contributors
On Mon, Apr 9, 2018 at 11:19 PM Alexander Leshkin <
alexander.lesh...@gmail.com> wrote:

> I'm stuck with a few issues in JDT compiler those make not possible to
> launch "super sourced" tests at source level >= 9.
> So, I have to first make patches for JDT and create custom JDT build
> before proceeding with patch for JEP286.
>

Hmm. One option is to wait till JDT stabilizes. The required patches are
probably going to be part 4.8M7 (or whatever follows the M6). For testing
purposes you could use
http://download.eclipse.org/eclipse/downloads/drops4/I20180409-2000/ or the
latest or more stable integration build which contains the patches but you
are probably using this one judging from the commit you are referencing at
the end.

Just for information.
> The first issue with JDT is about how GwtIncompatible annotaion handled by
> the GWT compiler.
> JDT AST TypeDeclaration may contains empty arrays of methods and fields
> after applying GwtIncompatible.
> But JDT assumes that for type without methods and fields the corresponding
> members are equal to `null` instead of empty arrays.
> E.g.: TypeDeclaration.java#L730
> 
> The line above throws AIOOBE for type wich methods had been removed due to
> GwtIncompatible.
> On other side, this issue may be fixed on GWT side, I think.
>

Yes, this can be fixed in GwtIncompatiblePreprocessor. Previously JDT used
zero length arrays instead of null, but null should be fine if it doesn't
trip any of our assumptions.


> The second issue is a bug with handling Deprecated annotation that was
> introduced in
> https://github.com/eclipse/eclipse.jdt.core/commit/79d5afecf5f237634a5562279fdceca6591b2b58
> .
> This issue leads to AIOOBE when there is an annotation marked as
> Deprecated. I noticed this issue for GwtScriptOnly annotation.
>

Intermediate builds of JDT are normally quite fragile, I wouldn't be
surprised if this is the case. Just out of curiosity what is it stack trace
for this failure? Might it have been triggered by a changed assumption in
JDT?


> --
> 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/37d9249d-0a6a-4403-b07d-e3cb09492bc5%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAC7T7gmP81A3rgkBOGm2sLrq5EEd5MZCornt3upEfSdaGPg7HQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.