Bug 386888 - spring-data hello-worlds sample fails to compile with 1.7.0
Summary: spring-data hello-worlds sample fails to compile with 1.7.0
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.7.0   Edit
Hardware: PC Mac OS X
: P2 major (vote)
Target Milestone: 1.7.1   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-08 16:12 EDT by Andrew Clement CLA
Modified: 2012-08-27 13:54 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2012-08-08 16:12:37 EDT
Clone the project from:

git@github.com:SpringSource/spring-data-neo4j.git 

go into hello-worlds and 'mvn clean test'. It works as it is using 1.6.12.  But edit the pom and change it to 1.7.0 and you get errors on compile:

[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project spring-data-neo4j-hello-worlds: Compiler errors :
[ERROR] error at public class World {
[ERROR] ^^^^
[ERROR] /Users/aclement/gits/spring-data-neo4j/spring-data-neo4j-examples/hello-worlds/src/main/java/org/springframework/data/neo4j/examples/hellograph/World.java:12:0::0 The type org.springframework.data.neo4j.examples.hellograph.World must implement the inherited abstract method org.springframework.data.neo4j.aspects.core.NodeBacked.relateTo(Lorg/springframework/data/neo4j/aspects/core/NodeBacked;Ljava/lang/Class;Ljava/lang/String;)
[ERROR] see also: org/springframework/data/neo4j/aspects/core/NodeBacked.java::0
[ERROR] see also: org/springframework/data/neo4j/aspects/support/node/Neo4jNodeBacking.aj:66::0
[ERROR] error at public class World {
[ERROR] ^^^^
[ERROR] /Users/aclement/gits/spring-data-neo4j/spring-data-neo4j-examples/hello-worlds/src/main/java/org/springframework/data/neo4j/examples/hellograph/World.java:12:0::0 The type org.springframework.data.neo4j.examples.hellograph.World must implement the inherited abstract method org.springframework.data.neo4j.aspects.core.NodeBacked.relateTo(Lorg/springframework/data/neo4j/aspects/core/NodeBacked;Ljava/lang/Class;Ljava/lang/String;Z)
[ERROR] see also: org/springframework/data/neo4j/aspects/core/NodeBacked.java::0
[ERROR] see also: org/springframework/data/neo4j/aspects/support/node/Neo4jNodeBacking.aj:66::0
Comment 1 Andrew Clement CLA 2012-08-24 18:19:55 EDT
This was due to some changes made under bug 374745.  In that bug some changes were made to equality checks (==/equals).  This led to two type variables no longer being considered the same if one was resolved and the other was not.  This comparison changing caused us to fail to see that an ITD on a type was meeting the needs of an abstract method in the supertype.  The solution is to resolve the ITD members up front so that the equality tests will succeed.

This is a relatively major change as they were previously resolved on demand but all existing tests are OK with this change and the spring-data stuff works now too. I made the following serious changes:
- resolvedmembers remember their resolved state and don't repeat resolution of their components if resolve is called again.
- all the ITD related resolvedmembers are resolved eagerly in EclipseFactory
Comment 2 Andrew Clement CLA 2012-08-24 20:53:10 EDT
spoke a little too soon. 'mvn compile' started working but the subsequent 'mvn test' fails.  Debugging through that at the moment.
Comment 3 Andrew Clement CLA 2012-08-27 13:54:40 EDT
fixed again!  Enhanced the return type comparison to *always* try and use the generics information. latest 1.7.1.BUILD-SNAPSHOT in the spring snapshot maven repo contains the fix.