viatra / EMF-IncQuery

This repository is only kept for historic reasons. All development happens on eclipse.org
http://eclipse.org/viatra
13 stars 4 forks source link

"Clean" doesn't remove compile errors from src-gen #342

Closed istvanrath closed 11 years ago

istvanrath commented 11 years ago

I have been witnessing this problem continuously. Invoking a "clean" on incquery projects does not remove compile errors from the src-gen folder. To remove these errors, one needs to open all .eiq files in the project, and trigger the builder by editing and saving them.

abelhegedus commented 11 years ago

I have mentioned this to @ujhelyiz in person, but forgot to create an actual ticket. The problem is, that the cleaner doesn't remove the files created for xbase expressions.

istvanrath commented 11 years ago

thanks, reassigning to @okrosa

ujhelyiz commented 11 years ago

@istvanrath Please try to reproduce this issue, as @okrosa couldn't reproduce it.

istvanrath commented 11 years ago

@okrosa the issue is quite easy to reproduce: introduce a compile error into the src-gen folder manually (e.g. delete a generated class, or write junk into one of the files). A Clean/Rebuild cycle will not resolve such problems, only opening the .eiq, modify/save/autobuild will resolve it.

@ujhelyiz Is this behavior perhaps by design?

ujhelyiz commented 11 years ago

I don't know of any explicit design decision about this. It is possible however, that we rely on some Xtext-functionality that only clears the classes it knows about (see also JvmModelInference etc.).

istvanrath commented 11 years ago

@okrosa : after discussion with @ujhelyiz we ask you to create a workaround by which "clean" will remove all contents of the src-gen folder for 0.6.8. For 0.7, we will likely go for another solution that will be necessary for the "Query Library" family of features; this is to be discussed at the next meeting.

okrosa commented 11 years ago

Ok, I'll look into it now. Just another remark: If I have an empty eiq, than an empty GroupOfFileTester is created in the gen folder, which seems unnecessary.

okrosa commented 11 years ago

Unfortunately I still cannot reproduce it on my setup. I can change anything in the src-gen folder, but the clean would wipe out everything. The eiq file is closed during this, ant the autobuild is switched off. (Interesting side effect that the errors in the generated code aren't reported in the eclipse, but I think it is a feature not a bug.)

istvanrath commented 11 years ago

Switch on autobuild to see compile errors.

istvanrath commented 11 years ago

Also try with 3.7.x or 3.8.x Eclipse (I'm using it).

okrosa commented 11 years ago

Just a status report for fun: now it seems that the problem is present, when we have a generator.eiqgen (even if the has a comment in it).

okrosa commented 11 years ago

After some debugging I gathered the following findings:

Based on these findings with @ujhelyiz we recommend to postpone this fix to the 0.7 version. It is a critical part of the system and should be looked through thoroughly. (I tried to implement a quickfix last day without success.)

ujhelyiz commented 11 years ago

The additional reason I suggested a postponing that we might need to change the builder registrations to avoid this issue - but that would break all existing user projects (we need to update them manually).

As in the 0.7 timeframe we plan to rename all our projects, we would also break all existing user projects, so we would not bother our users that much.

istvanrath commented 11 years ago

OK, 0.7 then.

ujhelyiz commented 11 years ago

I think, this issue is now fixed in master.

I simply used a new builder, that uses the required dependency information between eiqgen files and eiq files, and simply cleans up as needed.

@istvanrath please test, whether the issue is fixed.

istvanrath commented 11 years ago

Indeed it is fixed, well done.