I would say that you're not supposed to set compiler.stackMode to anything
but a single value, because it doesn't have a property-provider; and that's
exactly the problem with the generated JS: the snippet where the error
occurs is a property provider, but because there's no <property-provider>
for that property, it generates invalid JS (granted, it could have failed
instead).
What I don't quite understand is that you're saying (IIUC) it only occurs
with -setProperty and not <set-property>.
On Tuesday, November 28, 2017 at 8:57:38 AM UTC+1, Freddy Boucher wrote:
>
> Hi,
>
> On a GWT 2.8.2 Maven project using *tbroyer/gwt-maven-plugin*
>
> When I declare:
>
> <compilerArgs>
> <arg>-setProperty</arg>
> <arg>compiler.stackMode=native,emulated</arg>
> </compilerArgs>
>
>
>
> it fails:
>
> [INFO] Compiling 10 permutations
>
> [INFO] Compiling permutation 0...
>
> [INFO] Compiling permutation 1...
>
> [INFO] Compiling permutation 2...
>
> [INFO] Compiling permutation 3...
>
> [INFO] Compiling permutation 4...
>
> [INFO] Compiling permutation 5...
>
> [INFO] Compiling permutation 6...
>
> [INFO] Compiling permutation 7...
>
> [INFO] Compiling permutation 8...
>
> [INFO] Compiling permutation 9...
>
> [INFO] Compile of permutations succeeded
>
> [INFO] Compilation succeeded -- 53.925s
>
> [INFO] Linking into
> /Users/freddyboucher/Private/Programming/gwt-storage-objectify/gwt-storage-objectify-client/target/gwt-storage-objectify-client-0.0.1-SNAPSHOT/app;
>
> Writing extras to
> /Users/freddyboucher/Private/Programming/gwt-storage-objectify/gwt-storage-objectify-client/target/gwt-storage-objectify-client-0.0.1-SNAPSHOT/WEB-INF/deploy/app
>
> [INFO] Invoking Linker Cross-Site-Iframe
>
> [INFO] Attempting to optimize JS
>
> [INFO] [ERROR] Unable to parse JavaScript
>
> [INFO] com.google.gwt.dev.js.JsParserException:
> StandardLinkerContext.optimizeJavaScript(647): missing { before function
> body
>
> [INFO] > providers['compiler.stackMode'] =
> function()null;values['compiler.stackMode'] =
> {'emulated':0,'native':1,'strip':2};providers['user.agent'] = function(){
>
> [INFO] > --------------------------------------------------^
>
> [INFO] at com.google.gwt.dev.js.JsParser$1.error(JsParser.java:111)
>
> [INFO] at
> com.google.gwt.dev.js.rhino.Context.reportError(Context.java:459)
>
> [INFO] at
> com.google.gwt.dev.js.rhino.TokenStream.reportSyntaxError(TokenStream.java:1594)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.reportError(Parser.java:72)
>
> [INFO] at
> com.google.gwt.dev.js.rhino.Parser.mustMatchToken(Parser.java:64)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.function(Parser.java:254)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.primaryExpr(Parser.java:1224)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.memberExpr(Parser.java:1163)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.unaryExpr(Parser.java:1079)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.mulExpr(Parser.java:1031)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.addExpr(Parser.java:1015)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.shiftExpr(Parser.java:1003)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.relExpr(Parser.java:987)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.eqExpr(Parser.java:976)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.bitAndExpr(Parser.java:966)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.bitXorExpr(Parser.java:956)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.bitOrExpr(Parser.java:946)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.andExpr(Parser.java:935)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.orExpr(Parser.java:924)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.condExpr(Parser.java:908)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.assignExpr(Parser.java:890)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.assignExpr(Parser.java:897)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.expr(Parser.java:880)
>
> [INFO] at
> com.google.gwt.dev.js.rhino.Parser.statementHelper(Parser.java:775)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.statement(Parser.java:360)
>
> [INFO] at
> com.google.gwt.dev.js.rhino.Parser.parseFunctionBody(Parser.java:156)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.function(Parser.java:257)
>
> [INFO] at
> com.google.gwt.dev.js.rhino.Parser.parseFunctionBody(Parser.java:154)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.function(Parser.java:257)
>
> [INFO] at com.google.gwt.dev.js.rhino.Parser.parse(Parser.java:116)
>
> [INFO] at com.google.gwt.dev.js.JsParser.parseImpl(JsParser.java:133)
>
> [INFO] at com.google.gwt.dev.js.JsParser.parse(JsParser.java:88)
>
> [INFO] at com.google.gwt.dev.js.JsParser.parseInto(JsParser.java:93)
>
> [INFO] at
> com.google.gwt.core.ext.linker.impl.StandardLinkerContext.optimizeJavaScript(StandardLinkerContext.java:443)
>
> [INFO] at
> com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.generateSelectionScript(SelectionScriptLinker.java:428)
>
> [INFO] at
> com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.generateSelectionScript(SelectionScriptLinker.java:416)
>
> [INFO] at
> com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.emitSelectionScript(SelectionScriptLinker.java:310)
>
> [INFO] at
> com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.link(SelectionScriptLinker.java:212)
>
> [INFO] at
> com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeFinalLink(StandardLinkerContext.java:339)
>
> [INFO] at com.google.gwt.dev.Link.doSimulatedShardingLink(Link.java:459)
>
> [INFO] at com.google.gwt.dev.Link.link(Link.java:178)
>
> [INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:244)
>
> [INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
>
> [INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
>
> [INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
>
> [INFO] at
> com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
>
> [INFO] at
> com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
>
> [INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:125)
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Reactor Summary:
>
> [INFO]
>
> [INFO] gwt-storage-objectify .............................. SUCCESS [ 0.173
> s]
>
> [INFO] gwt-storage-objectify-shared ....................... SUCCESS [ 1.390
> s]
>
> [INFO] gwt-storage-objectify-client ....................... FAILURE [
> 56.988 s]
>
> [INFO] gwt-storage-objectify-server ....................... SKIPPED
>
>
> This is the commit causing the issue:
> https://github.com/freddyboucher/gwt-storage-objectify/commit/a235206adfaf2dd29c2f456b3b966006729e110e
>
> Reverting the commit fixes the build.
>
> Thanks
>
--
You received this message because you are subscribed to the Google Groups "GWT
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.