Closed istvanrath closed 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.
thanks, reassigning to @okrosa
@istvanrath Please try to reproduce this issue, as @okrosa couldn't reproduce it.
@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?
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.).
@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.
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.
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.)
Switch on autobuild to see compile errors.
Also try with 3.7.x or 3.8.x Eclipse (I'm using it).
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).
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.)
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.
OK, 0.7 then.
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.
Indeed it is fixed, well done.
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.