Vertispan / j2clmavenplugin

Maven plugin to launch new J2CL compilation
https://vertispan.github.io/j2clmavenplugin/
Apache License 2.0
53 stars 26 forks source link

Build failure when using Elemental2 1.2.x #234

Closed hpehl closed 8 months ago

hpehl commented 9 months ago

The J2CL maven plugin stops working when using Elemental2 1.2.x.

Reproducer

mvn -B archetype:generate -DarchetypeGroupId=com.vertispan.j2cl.archetypes \
      -DarchetypeArtifactId=j2cl-archetype-simple \
      -DarchetypeVersion=0.21.0 \
      -DgroupId=org.acme \
      -DartifactId=helloworld \
      -Dversion=0.0.1 \
      -Dmodule=helloworld

cd helloworld
mvn package

→ No issues

sed -i 's/<elemental2.version>1.1.0<\/elemental2.version>/<elemental2.version>1.2.1<\/elemental2.version>/g' pom.xml
mvn clean package

→ Build error

[INFO] Starting com.google.elemental2:elemental2-core:1.2.1/stripped_bytecode_headers
[INFO] com.google.elemental2:elemental2-core:1.2.1/stripped_bytecode_headers: /private/tmp/helloworld/target/gwt3BuildCache/0.21.0/com.google.elemental2-elemental2-core-1.2.1/372a708cb89ddc52b085a53c2185ce46-stripped_sources/results/elemental2/core/BigInt.java:23: error: symbol not found jsinterop.base.JsBigint
import jsinterop.base.JsBigint;
       ^
...

[INFO] Starting com.google.elemental2:elemental2-dom:1.2.1/transpiled_js
[ERROR] com.google.elemental2:elemental2-core:1.2.1/transpiled_js: Error:BigInt.java:23: The import jsinterop.base.JsBigint cannot be resolved
niloc132 commented 8 months ago

Update: I have a staging repo for jsinterop-base, and updating that in the j2cl-maven-plugin works as expected (this will not require a new release to use, just a single config setting), but the next issue is that elemental2 1.2.x uses newer externs than we currently have published, so we need a newer closure-compiler build next (or, projects using elemental2 need their own externs added to the project).

hpehl commented 8 months ago

Sorry, @niloc132, but I don't get it. The issue is closed, #235 is merged, but I can't reproduce the fix. The above code still fails. So what's missing? Does it need a new j2cl-m-p release?