Community
Participate
Working Groups
After a file has been created or deleted, ajc seems to call the method CoreOutputLocationManager.reportClassFileWrite too many times (once for each class file). The AJDT Event Trace shows that only a single source file was affected and that the build was incremental. Getting this right is important for AJDT because AJDT is using the reportClassFileWrite method to keep track of what has changed. This gets passed to dependent projects (specificall Java Projects, not AJ projects) and they perform a rebuild based on this delta. Attaching a project.
Created attachment 129482 [details] Project that exhibits this behavior Create a new class in the default directory, say Nothing4. The incremental build that occurs after creation will call "reportClassFileWrite" for each class file. Shouldn't it only be for the single class file that has been created (ie- Nothing4.class)?
marked 1.6.4 but unlikely to make it unless everything else goes well. Surprised to see it blocking 268827 as I plan to close that bug when we have the mainline path working (edit/save of existing files gives fast builds)...
i imported that project but it is broken - is that intentional? The type Nothing4 is defined twice... once in the src2 default package and once in the src default package? So I deleted it from the src package. On recreating it in the src default package I don't get an error (which I should) - this is a bug, but not the one raised. However, I can add new files that don't clash with existing and I don't see reportClassFileWrite() called more than once for what I just added. If the type I add defines two classes, then I just see reportClassFileWrite() for the two new classes. If the project is in an incorrect state (which would be revealed by a fullbuild) then I do see reportClassFileWrite called more than once on an incremental build, but it is not called for all types in the project, just the one I've just defined and the one added during the previous build.
the bug in here that i am able to recreate - to do with split packages (across source folders) and defining the same type twice appears to be related to clearing up the compiler/lookupenvironment too frequently (after every build). If it were reused rather than recreated the build performance will increase and these duplicate type problems will appear. I'll raise this as a separate bug.
behaving as expected. The issues that fell out of this were: - a source folder that is also an output folder can have problems with resource deletions (now covered by another bug) - split packages (across source folders) with duplicate types is not detected on incremental builds (now covered by another bug) - deleting an aspect causes a full build (now covered by an enhancement request) the latter two are scheduled for 1.6.5