gwtd3 / gwt-d3

A GWT wrapper library around the d3.js library
Other
131 stars 53 forks source link

Compile Error with GWT 2.8 #135

Open mgoerdes opened 8 years ago

mgoerdes commented 8 years ago

Hi, with GWT 2.8-SNAPSHOT (not Beta1) I currently get the following compile error:

[INFO] Compiling module com.bearingpoint.davinci.gui.Banking [INFO] Errors in com/github/gwtd3/api/core/Value.java [INFO] [ERROR] Line 249: Method 'boolean Boolean.booleanValue()' is implemented by devirtualized type 'Boolean' JSO and can only be used in calls within a JSNI method body.

Is there a chance to fix it? BR, Mark

ericcitaire commented 8 years ago

Hi Mark,

gwt-d3 latest release is not GWT 2.8 compatible. @anthonime has made some changes in the branch gwt2.8 to make it compatible.

It hasn't been released yet mostly because of Google App Engine (our demo host) was not java 8 compatible. AFAIK, this is still the case.

Feel free to try this branch in your project and give us feedback.

Cheers, Eric.

johnthuss commented 8 years ago

I tried the gwt2.8 branch (after rebasing on master). This particular error is not fixed yet on the gwt2.8 branch when compiling against gwt-2.8.0-rc1 which was released a few days ago (July 29).

If I just remove the problem line (well, two lines), everything seems to work ok, but I'm not positive that this is the right change.

michael-newsrx commented 8 years ago

This issue still exists for GWT 2.8.0-RC2. I don't understand why the backend should require java 1.8, the stuff is compiled to js and runs in the browser?

mgoerdes commented 8 years ago

I did not have time to check the GWT 2.8 related snapshot but I assume that the above issue relates to the following (see also GWT 2.8.0-RC1 Release notes): JSNI disallows method references to Double, String, Boolean and its super types: https://github.com/gwtproject/gwt/issues/9356.

`/**

As this code is also available in the GWT 2.8 enabled branch I assume that we are facing the same issue. GWT 2.8. beta1 will be ok, GWT 2.8. rc1 and rc2 not.

michael-newsrx commented 8 years ago
Yeah... we had to backtrack on our update to RC2 here and go back
  to BETA1, even with latest snapshot pulled via jitpack.io

On 08/17/2016 10:00 AM, Mark Gördes
  wrote:

  I did not have time to check the GWT 2.8 related snapshot but I
    assume that the above issue relates to the following (see also
    GWT 2.8.0-RC1 Release notes): JSNI disallows method references
    to Double, String, Boolean and its super types: gwtproject/gwt#9356.
    The code
  /**
      * @return true if the value is a Javascript boolean value, a
      Javascript Boolean object or a Java {@link Boolean}
      * instance.
      */
      public final native boolean isBoolean()/*-{
      return typeof (this.datum) === "boolean"
      || this.datum instanceof Boolean
      || (this.datum != null && this.datum
      .@java.lang.Boolean::booleanValue() != null);
      }-*/;
  As this code is also available in the GWT 2.8. branch I assume
    that we are facing the same issue? GWT 2.8. beta1 will be ok,
    GWT 2.8. rc1 and rc2 not.
  —
    You are receiving this because you commented.
    Reply to this email directly, view
      it on GitHub, or mute
      the thread.

  {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/gwtd3/gwt-d3","title":"gwtd3/gwt-d3","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/gwtd3/gwt-d3"}},"updates":{"snippets":[{"icon":"PERSON","message":"@mgoerdes in #135: I did not have time to check the GWT 2.8 related snapshot but I assume that the above issue relates to the following (see also GWT 2.8.0-RC1 Release notes): JSNI disallows method references to Double, String, Boolean and its super types: https://github.com/gwtproject/gwt/issues/9356. The code\r\n\r\n` /**\r\n     * @return true if the value is a Javascript boolean value, a Javascript Boolean object or a Java {@link Boolean}\r\n     *         instance.\r\n     */\r\n    public final native boolean isBoolean()/*-{\r\n\t\treturn typeof (this.datum) === \"boolean\"\r\n\t\t\t\t|| this.datum instanceof Boolean\r\n\t\t\t\t|| (this.datum != null \u0026\u0026 this.datum\r\n\t\t\t\t\t\t.@java.lang.Boolean::booleanValue() != null);\r\n    }-*/;`\r\n\r\nAs this code is also available in the GWT 2.8. branch I assume that we are facing the same issue? GWT 2.8. beta1 will be ok, GWT 2.8. rc1 and rc2 not."}],"action":{"name":"View Issue","url":"https://github.com/gwtd3/gwt-d3/issues/135#issuecomment-240419911"}}}
xamde commented 6 years ago

AppEngine supports Java 8 now (for some time); Can we upgrade to GWT 2.8 (and maybe also to D3 4.x)?