Is there anyone who works on Java10 support? I mean dependencies update (ASM, JDT) and new language feature - Local-Variable Type Inference.If not, I can try to create PR.
The next step will be to support Java 10 APIs (we still have some Java 9 ones to add) and language features.
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.
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).
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.
var s = "s";
String s = "s";
var tuple = new Object(){ int first, second; };
$Local$ tuple = new Outer$1();
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?
Compiling module sample.Java10
[ERROR] Could not find $Local$ in types compiled from source. Is the source glob too strict?
[ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:111)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptImmutable(JModVisitor.java:313)
at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
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.JMethod.visitChildren(JMethod.java:786)
at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)
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.impl.UnifyAst.mainLoop(UnifyAst.java:1401)
at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:896)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
at com.google.gwt.dev.Compiler.main(Compiler.java:125)
Caused by: java.lang.AssertionError
at com.google.gwt.dev.jjs.impl.UnifyAst.translate(UnifyAst.java:1577)
at com.google.gwt.dev.jjs.impl.UnifyAst.translate(UnifyAst.java:1590)
at com.google.gwt.dev.jjs.impl.UnifyAst.access$1(UnifyAst.java:1586)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:371)
at com.google.gwt.dev.jjs.ast.JVisitor.endVisit(JVisitor.java:328)
at com.google.gwt.dev.jjs.ast.JLocal.traverse(JLocal.java:55)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptImmutable(JModVisitor.java:305)
... 25 more
[ERROR] at Java10Sample.java(14): $Local$ o
com.google.gwt.dev.jjs.ast.JLocal
[ERROR] at Java10Sample.java(13): <source info not available>
com.google.gwt.dev.jjs.ast.JMethodBody
[ERROR] at Java10Sample.java(13): sample.Java10Sample.onModuleLoad()V
com.google.gwt.dev.jjs.ast.JMethod
Yes, all i had to do to make non-denotable type to work, is to replace `$Local$` type with anonymous synthetic class name `Outer$1` when creating JClassType for JLocal.
Regarding tests - are you sure that GwtAstBuilderTest is a sutable place for these tests? I noticed that Java9 tests were placed into the new class Java9AstTest.
Could you upload the patch to gwt so I can comment there? :) It might just be the case that because the variable declaration happens before the Anonymous inner class s created it has not been registered in typeMap, and probably this is the only case in which a variable declaration can have the type of local or anonymous class that is defined after.
Ok. I'll prepare and upload the patch.Thanks for pointing out the solution's direction.
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.
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.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.
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.
--
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-co...@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.
On Mon, Apr 9, 2018 at 11:19 PM Alexander Leshkin <alexande...@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.
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?
Eclipse 4.7.3a is ready (including Java 10 support) - https://www.eclipse.org/eclipse/news/4.7.3a/
JRE emulation, hehe just contribute it! (:P) I recommend to create some super source in your project and try out some types you really want! it is much easier than it looks, it will work instantly in your project and when it gets mature, you can finally contribute back to GWT. Also, are you interested in any API in particular?
--
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-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/8b159ed2-9ca5-4b30-8d57-6940badd77ef%40googlegroups.com.
I guess I am bit overworked :) ignore the last statement!
I guess I am bit overworked :) ignore the last statement!:D :D and now you are sad? :)
--
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-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/526591e7-bb40-4e09-a280-31206f705d86%40googlegroups.com.
But I need to figure out if this is a local problem due to our mirrors of the maven repos or if the HEAD-SNAPSHOT is maybe not updated for some time.
Thomas,
would you mind pushing a new snapshot release of your maven plugin release to sonatype ?
I see that you have migrated to a newer version of the surefire plugin on github, but this version is not yet available on sonatype. (latest update is 20170920)
I can’t build the verson myself, due to security restrictions, but we want to prepare for java 10. The NPE that you mention is stopping us from completing this migration.
I thought it would be better to ask now, before Belgium beats France on saturday :-P