Neseek77 / gwt-ent

Automatically exported from code.google.com/p/gwt-ent
1 stars 0 forks source link

GWT Compiler + ListGrid + com.gwtent.reflection.client compile failure #53

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
#summary GWT Compiler + ListGrid + com.gwtent.reflection.client compile failure

----

I'm getting the following GWT compile failures:

{{{
[INFO] Compiling module com.cedarcone.MVP1.MVP1
[INFO]    Adding '1' new generated units
[INFO]       Validating units:
[INFO]          Errors in 
'P:\EclipseWorkSpaces\Scott-Tiger\MVP1\target\.generated\com\smartgwt\client\wid
gets\events\DropCompleteEvent___Reflection.java'
[INFO]             See snapshot: 
C:\Users\Bruce\AppData\Local\Temp\com.smartgwt.client.widgets.events.DropComplet
eEvent___Reflection8033253860713325366.java
[INFO]          Ignored 1 unit with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all 
errors.
[INFO]    [ERROR] Errors in 
'P:\EclipseWorkSpaces\Scott-Tiger\MVP1\target\.generated\com\smartgwt\client\wid
gets\events\DropCompleteEvent___Reflection.java'
[INFO]       [ERROR] Line 30: Bound mismatch: The generic method fire(S, 
JavaScriptObject) of type DropCompleteEvent is not applicable for the arguments 
(DropCompleteHandler, JavaScriptObject). The inferred type DropCompleteHandler 
is not a valid substitute for the bounded parameter <S extends 
DropCompleteHandler & HasHandlers>
[INFO]       See snapshot: 
C:\Users\Bruce\AppData\Local\Temp\com.smartgwt.client.widgets.events.DropComplet
eEvent___Reflection6049546235350285292.java
[INFO]    [ERROR] Errors in 
'gen/com/gwtent/reflection/client/TypeOracle_Visitor.java'
[INFO]       [ERROR] Line 2180: Rebind result 
'com.smartgwt.client.widgets.events.DropCompleteEvent___Reflection' could not 
be found
}}}

----

I have isolated the failure to a very simple test case. This is a GWT compile 
time failure.

For the test case to fail all of the following needs to be true.

* A class implements the interface com.gwtent.reflection.client.Reflection
* A private field of type ListGrid is declared (although never referenced).
* The method getClass() is called in the constructor.

If one or more of these three elements is not present the GWT compiler failure 
does not occur.

----

Here is the code that causes the failure:

{{{
public class GWTEntTest implements com.gwtent.reflection.client.Reflection {

    private com.smartgwt.client.widgets.grid.ListGrid listGrid;

    public GWTEntTest() {
        getClass();
    }
} 
}}}

For a little more background I researched the source code of the interface 
com.gwtent.reflection.client.Reflection. This interface has no methods and only 
uses the annotation com.gwtent.reflection.client.Reflexible.

Here is the code for com.gwtent.reflection.client.Reflection (with comments 
removed)

{{{
@Reflectable(fieldAnnotations = true, relationTypes = true, superClasses = 
true, assignableClasses = true)
public interface Reflection {

}
}}}

Here is the code for com.gwtent.reflection.client.Reflexible (with comments 
removed)

{{{
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Reflectable {
    public boolean classAnnotations() default true;
    public boolean fields() default true;
    public boolean methods() default true;
    public boolean constructors() default true;
    public boolean fieldAnnotations() default true;
    public boolean relationTypes() default false;
    public boolean superClasses() default false;
    public boolean assignableClasses() default false;
}
}}}

----

It’s not possible for me to determine the root cause from this. It could be 
in any combination of the GWT compiler, 
com.smartgwt.client.widgets.grid.ListGrid, and com.gwtent.reflection.client 
library.

Original issue reported on code.google.com by br...@cedarcone.com on 8 Apr 2013 at 2:22

GoogleCodeExporter commented 8 years ago
Hi,

Anybody has fixed the issue? I encounter the same problem.
Appreciate if you can share with us the solutions.

Original comment by ni.xuy...@gmail.com on 17 Sep 2014 at 8:57