APT is not stable #194

Closed
bcfelix opened this Issue Jul 6, 2012 · 11 comments

Comments

Projects
None yet
3 participants
@bcfelix

bcfelix commented Jul 6, 2012

Refer to Google Group post https://groups.google.com/forum/#!topic/querydsl/8zsX7G9ufuI

I got two problems in APT.

The first is new$ cannot be resolved or is not a field:
Sometimes when i save "File A" in Eclipse (STS 2.9.2), this problem occurs in "File B" where "File B" extends an abstract class "File C". So, i go to check the "File B", has a line public final BooleanPath new$ = _super.new$; I found "File C" was missing the line public final BooleanPath new$ = _super.new$; When i clean the project. The line reappear in "File C". This problem occurs frequently.

The second is QUser cannot be resolved to a type:
Again, sometimes when saving a file "File A", this problem occurs in "File B" where "File B" imported QUser. I checked both QUser is at the right place without any error, and the "File B" was properly imported the QUser. Whatever i clean the project, the problem was not solved. What i need is to delete the line import ....QUser and add it back again to solve this problem. This problem occurs nearly every times i save files.

Note:
File A can be any files out of File B and File C that it is totally not related to File B and File C, where File C is an abstract class and was annotated with @MappedSuperclass. File B an concrete POJO class annotated with @entity and extends File C.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jul 6, 2012

Member

Do you get the same issue when building in Maven? Also does disabling Lombok affect the situation?

Member

timowest commented Jul 6, 2012

Do you get the same issue when building in Maven? Also does disabling Lombok affect the situation?

@bcfelix

This comment has been minimized.

Show comment
Hide comment
@bcfelix

bcfelix Jul 6, 2012

Disable Lombok cannot solve the problem,
Since my project is not a maven project, so i am trying to build with Maven.

bcfelix commented Jul 6, 2012

Disable Lombok cannot solve the problem,
Since my project is not a maven project, so i am trying to build with Maven.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jul 11, 2012

Member

Did building with Maven help? Also how does AbstractAuditable look like?

Member

timowest commented Jul 11, 2012

Did building with Maven help? Also how does AbstractAuditable look like?

@bcfelix

This comment has been minimized.

Show comment
Hide comment
@bcfelix

bcfelix Jul 13, 2012

I found something interesting.
Previously, i said:
"The second is QUser cannot be resolved to a type:
Again, sometimes when saving a file "File A", this problem occurs in "File B" where "File B" imported QUser. I checked both QUser is at the right place without any error, and the "File B" was properly imported the QUser. Whatever i clean the project, the problem was not solved. What i need is to delete the line import ....QUser and add it back again to solve this problem. This problem occurs nearly every times i save files."

Solve problem is not delete the corresponding lines, but just make some changes to the file and save it.

So, this problem should be caused by Eclipse ART build process. Maybe the build order caused this problem.

bcfelix commented Jul 13, 2012

I found something interesting.
Previously, i said:
"The second is QUser cannot be resolved to a type:
Again, sometimes when saving a file "File A", this problem occurs in "File B" where "File B" imported QUser. I checked both QUser is at the right place without any error, and the "File B" was properly imported the QUser. Whatever i clean the project, the problem was not solved. What i need is to delete the line import ....QUser and add it back again to solve this problem. This problem occurs nearly every times i save files."

Solve problem is not delete the corresponding lines, but just make some changes to the file and save it.

So, this problem should be caused by Eclipse ART build process. Maybe the build order caused this problem.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jul 13, 2012

Member

Could you still post AbstractAuditable?

Member

timowest commented Jul 13, 2012

Could you still post AbstractAuditable?

@bcfelix

This comment has been minimized.

Show comment
Hide comment
@bcfelix

bcfelix Jul 13, 2012

The AbstractAuditable.class comes from org.springframework.data.domain.AbstractAuditable

bcfelix commented Jul 13, 2012

The AbstractAuditable.class comes from org.springframework.data.domain.AbstractAuditable

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jul 25, 2012

Member

I have tried AbstractAuditable usage in a project with Querydsl and Eclipse, but didn't run into any problems. Could you maybe attach a minimal example project (pom.xml and three entities)?

Member

timowest commented Jul 25, 2012

I have tried AbstractAuditable usage in a project with Querydsl and Eclipse, but didn't run into any problems. Could you maybe attach a minimal example project (pom.xml and three entities)?

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Sep 21, 2012

Member

Is this issue still revelant? Can you replicate the problem with Querydsl 2.7.3?

Member

timowest commented Sep 21, 2012

Is this issue still revelant? Can you replicate the problem with Querydsl 2.7.3?

@zaj78

This comment has been minimized.

Show comment
Hide comment
@zaj78

zaj78 Nov 25, 2012

The issue is still there with Eclipse and Querydsl 2.9.0

If i edit and save some persistent class A, the fields of it's superclass B are generated in QA, but the fields of B's superclass are not. That corrupts my queries or Q-Classes of A subclasses. If i clean the project, everything is OK again.

zaj78 commented Nov 25, 2012

The issue is still there with Eclipse and Querydsl 2.9.0

If i edit and save some persistent class A, the fields of it's superclass B are generated in QA, but the fields of B's superclass are not. That corrupts my queries or Q-Classes of A subclasses. If i clean the project, everything is OK again.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Dec 12, 2012

Member

Should be fixed now.

Member

timowest commented Dec 12, 2012

Should be fixed now.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jan 13, 2013

Member

Released in 3.0.0.BETA1

Member

timowest commented Jan 13, 2013

Released in 3.0.0.BETA1

@timowest timowest closed this Jan 13, 2013

@timowest timowest added this to the 3.0.0 milestone Apr 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment