Community
Participate
Working Groups
I have moved on e legacy Java project to Aspect. But as the documentation says it's far from smooth. My configuration is - I started adding tracing aspects in the same project, under a new package though in the same project. So my source now contains java files to be woven in and aspects with which to weave them at one place. And same output dir bin. As documentation says I haven't set up inpath or aspectpath or outjar right now. I have checked in the box Incremental Otimization in AspectJ comipler (I think it's defualt in 1.7.3 and I want that as it is) I can see that after a full build whenever I change a .java file, incremental build happens. This is good and expected. But the problem is I was expecting an increment build only to kick in when I was making a spell correction in one of the advice in one of the aspects. Needless to say it pains a lot. And goes for full build of my 18000+ files. Is it a bug? Already reported? And if I can move to the new AJDT with my current eclipse? Or am I doing something wrong? AJDT stack trace is as below--- 19:0:2 Startup information: AJDT version: 2.2.3.e42x-RELEASE-20130625-1400 AspectJ Compiler version: 1.7.3 usingVisualiser=true usingXref=true usingCUprovider=true org.aspectj.ajdt.core.compiler.weaver.XNoInline = true org.aspectj.ajdt.core.compiler.lint.noExplicitConstructorCall = ignore ajde.version.at.previous.startup = 2.2.3.e42x-RELEASE-20130625-1400 promptForAutoOpenCrossReference = false org.aspectj.ajdt.core.compiler.lint.noJoinpointsForBridgeMethods = ignore org.aspectj.ajdt.core.compiler.lint.TypeNotExposedToWeaver = ignore org.aspectj.ajdt.core.compiler.lint.NoInterfaceCtorJoinpoint = ignore org.aspectj.ajdt.core.compiler.lint.InvalidAbsoluteTypeName = ignore org.eclipse.ajdt.core.compiler.nonStandardOptions = -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit org.eclipse.ajdt.internal.ui.tracing.checked.filters = set: Compiler,Builder org.aspectj.ajdt.core.compiler.lint.uncheckedAdviceConversion = ignore org.aspectj.ajdt.core.compiler.lint.elementAlreadyAnnotated = ignore org.aspectj.ajdt.core.compiler.lint.cantFindTypeAffectingJPMatch = ignore org.aspectj.ajdt.core.compiler.lint.annotationAsTargetForDecpIgnored = ignore org.aspectj.ajdt.core.compiler.lint.invalidTargetForAnnotation = ignore org.aspectj.ajdt.core.compiler.list.UnmatchedSuperTypeInCall = ignore org.aspectj.ajdt.core.compiler.lint.uncheckedArgument = ignore org.aspectj.ajdt.core.compiler.lint.runtimeExceptionNotSoftened = ignore org.aspectj.ajdt.core.compiler.lint.cantFindType = ignore org.aspectj.ajdt.core.compiler.lint.unmatchedTargetKind = ignore org.aspectj.ajdt.core.compiler.lint.enumAsTargetForDecpIgnored = ignore 19:0:11 Building AJ code scanner 19:0:11 Editor opened on LoggingAspectCombined.aj 19:1:23 Builder: Tidied output folder(s), removed class files and derived resources 19:1:45 AJC: Starting new build for project SM11.0 19:1:45 Timer event: 189753ms: Pre compile 19:2:7 Compiler configuration for project SM11.0 has been read by compiler. Resetting. 19:2:7 Configuration was [PROJECTSOURCEFILES_CHANGED, JAVAOPTIONS_CHANGED, ASPECTPATH_CHANGED, CLASSPATH_CHANGED, INPATH_CHANGED, NONSTANDARDOPTIONS_CHANGED, OUTJAR_CHANGED, PROJECTSOURCERESOURCES_CHANGED, OUTPUTDESTINATIONS_CHANGED, INJARS_CHANGED] 19:2:7 Resetting list of modified source files. Was null 19:2:7 Preparing for build: not going to be incremental because no successful previous full build 19:3:2 ===Code Select. Unit: LoggingAspectCombined.aj [ 1545, 4 ] 19:3:33 Compiler configuration for project ui-client-cjd-plugins-4.0 doesn't know previous state, so assuming EVERYTHING has changed. 19:9:13 AspectJ reports build successful, build was: FULL 19:9:13 AJC: Build finished. Was full build: true 19:9:13 Timer event: 447984ms: Total time spent in AJDE 19:9:13 Timer event: 0ms: Refresh after build 19:10:12 Compiler configuration for project SM11.0 doesn't know previous state, so assuming EVERYTHING has changed. 19:10:12 Timer event: 696793ms: Total time spent in AJBuilder.build() 19:10:12 Timer event: 22ms: Update visualizer, xref, advice listeners for (separate thread): SM11.0 19:10:49 =========================================================================================== 19:10:49 Build kind = AUTOBUILD 19:10:49 Project=SM11.0, kind of build requested=Incremental AspectJ compilation 19:10:49 Timer event: 0ms: Flush included source file cache 19:10:49 Timer event: 9ms: Check delta 19:10:49 File: C:\Users\amanocha\Perforce\SM_11.0_Latest\sm_base\sm_base_core\src\main\java\com\ciena\aspects\logging\trace\LoggingAspectCombined.aj has changed. 19:10:49 but, we don't have any state yet, so not recording the change. 19:10:49 build: Examined delta - 1 changed, 0 added, and 0 deleted source files in required project SM11.0 19:10:49 Timer event: 25ms: Looking for and marking configuration changes in SM11.0 19:10:49 Configuration changes found: true 19:10:49 Timer event: 25ms: Look for source/resource changes 19:10:49 Setting list of classpath elements with modified contents: 19:10:49 [] 19:10:49 Timer event: 89ms: Pre compile 19:11:3 Compiler configuration for project SM11.0 has been read by compiler. Resetting. 19:11:3 Configuration was [PROJECTSOURCEFILES_CHANGED, JAVAOPTIONS_CHANGED, ASPECTPATH_CHANGED, CLASSPATH_CHANGED, INPATH_CHANGED, NONSTANDARDOPTIONS_CHANGED, OUTJAR_CHANGED, PROJECTSOURCERESOURCES_CHANGED, OUTPUTDESTINATIONS_CHANGED, INJARS_CHANGED] 19:11:3 Resetting list of modified source files. Was null 19:11:3 Preparing for build: not going to be incremental because no successful previous full build 19:11:49 Timer event: 59384ms: Time to first compiled message 19:11:49 Timer event: 59424ms: Time to first woven message 19:18:32 AspectJ reports build successful, build was: FULL 19:18:32 AJDE Callback: finish. Was full build: true 19:18:32 Timer event: 463197ms: Total time spent in AJDE 19:18:32 Timer event: 0ms: Refresh after build 19:19:47 Types affected during build = 8382 19:21:36 Timer event: 646973ms: Total time spent in AJBuilder.build() 19:21:36 Timer event: 0ms: Update visualizer, xref, advice listeners for (separate thread): SM11.0 19:21:38 Timer event: 2258ms: Delete markers: SM11.0 (Finished deleting markers for SM11.0) 19:22:6 Timer event: 28097ms: Create markers: SM11.0 (Finished creating markers for SM11.0) 19:22:6 Created 23178 markers in 8356 files 19:22:40 =========================================================================================== 19:22:40 Build kind = AUTOBUILD 19:22:40 Project=SM11.0, kind of build requested=Incremental AspectJ compilation 19:22:41 Timer event: 0ms: Flush included source file cache 19:22:41 Timer event: 13ms: Check delta 19:22:41 File: C:\Users\amanocha\Perforce\SM_11.0_Latest\sm_base\sm_base_core\src\main\java\com\nortel\tnui\SiteManager.java has changed. 19:22:41 build: Examined delta - 1 changed, 0 added, and 0 deleted source files in required project SM11.0 19:22:41 Timer event: 28ms: Looking for and marking configuration changes in SM11.0 19:22:41 Configuration changes found: true 19:22:41 Timer event: 28ms: Look for source/resource changes 19:22:41 Setting list of classpath elements with modified contents: 19:22:41 [] 19:22:41 Timer event: 95ms: Pre compile 19:22:41 Sending the following configuration changes to the compiler: [] 19:22:41 1 source file changes since last build 19:22:41 Compiler configuration for project SM11.0 has been read by compiler. Resetting. 19:22:41 Configuration was [] 19:22:41 Resetting list of modified source files. Was [C:\Users\amanocha\Perforce\SM_11.0_Latest\sm_base\sm_base_core\src\main\java\com\nortel\tnui\SiteManager.java] 19:22:41 Preparing for build: planning to be an incremental build 19:22:43 Starting incremental compilation loop 1 of possibly 5 19:22:44 Timer event: 3399ms: Time to first compiled message 19:22:45 Timer event: 4184ms: Time to first woven message 19:22:45 AspectJ reports build successful, build was: INCREMENTAL 19:22:45 AJDE Callback: finish. Was full build: false 19:22:45 Timer event: 4293ms: Total time spent in AJDE 19:22:45 Timer event: 0ms: Refresh after build 19:22:45 Types affected during build = 1 19:22:45 Timer event: 4435ms: Total time spent in AJBuilder.build() 19:22:45 Timer event: 23ms: Update visualizer, xref, advice listeners for (separate thread): SM11.0 19:22:45 Timer event: 33ms: Delete markers: SM11.0 (Finished deleting markers for SM11.0) 19:22:45 Timer event: 106ms: Create markers: SM11.0 (Finished creating markers for SM11.0) 19:22:45 Created 66 markers in 1 files 19:22:50 =========================================================================================== 19:22:50 Build kind = AUTOBUILD 19:22:50 Project=SM11.0, kind of build requested=Incremental AspectJ compilation 19:22:50 Timer event: 0ms: Flush included source file cache 19:22:50 Timer event: 9ms: Check delta 19:22:50 File: C:\Users\amanocha\Perforce\SM_11.0_Latest\sm_base\sm_base_core\src\main\java\com\nortel\tnui\SiteManager.java has changed. 19:22:50 build: Examined delta - 1 changed, 0 added, and 0 deleted source files in required project SM11.0 19:22:50 Timer event: 29ms: Looking for and marking configuration changes in SM11.0 19:22:50 Configuration changes found: true 19:22:50 Timer event: 29ms: Look for source/resource changes 19:22:50 Setting list of classpath elements with modified contents: 19:22:50 [] 19:22:50 Timer event: 49ms: Pre compile 19:22:50 Sending the following configuration changes to the compiler: [] 19:22:50 1 source file changes since last build 19:22:50 Compiler configuration for project SM11.0 has been read by compiler. Resetting. 19:22:50 Configuration was [] 19:22:50 Resetting list of modified source files. Was [C:\Users\amanocha\Perforce\SM_11.0_Latest\sm_base\sm_base_core\src\main\java\com\nortel\tnui\SiteManager.java] 19:22:50 Preparing for build: planning to be an incremental build 19:22:50 Starting incremental compilation loop 1 of possibly 5 19:22:51 Timer event: 882ms: Time to first compiled message 19:22:52 Timer event: 1753ms: Time to first woven message 19:22:52 AspectJ reports build successful, build was: INCREMENTAL 19:22:52 AJDE Callback: finish. Was full build: false 19:22:52 Timer event: 1895ms: Total time spent in AJDE 19:22:52 Timer event: 0ms: Refresh after build 19:22:52 Types affected during build = 1 19:22:52 Timer event: 1961ms: Total time spent in AJBuilder.build() 19:22:52 Timer event: 1ms: Delete markers: SM11.0 (Finished deleting markers for SM11.0) 19:22:52 Timer event: 13ms: Update visualizer, xref, advice listeners for (separate thread): SM11.0 19:22:52 Timer event: 185ms: Create markers: SM11.0 (Finished creating markers for SM11.0) 19:22:52 Created 66 markers in 1 files 19:23:12 =========================================================================================== 19:23:12 Build kind = AUTOBUILD 19:23:12 Project=SM11.0, kind of build requested=Incremental AspectJ compilation 19:23:12 Timer event: 0ms: Flush included source file cache 19:23:12 Timer event: 8ms: Check delta 19:23:12 File: C:\Users\amanocha\Perforce\SM_11.0_Latest\sm_base\sm_base_core\src\main\java\com\ciena\aspects\logging\trace\LoggingAspectCombined.aj has changed. 19:23:12 build: Examined delta - 1 changed, 0 added, and 0 deleted source files in required project SM11.0 19:23:12 Timer event: 55ms: Looking for and marking configuration changes in SM11.0 19:23:12 Configuration changes found: true 19:23:12 Timer event: 55ms: Look for source/resource changes 19:23:12 Setting list of classpath elements with modified contents: 19:23:12 [] 19:23:12 Timer event: 106ms: Pre compile 19:23:12 Sending the following configuration changes to the compiler: [] 19:23:12 1 source file changes since last build 19:23:12 Compiler configuration for project SM11.0 has been read by compiler. Resetting. 19:23:12 Configuration was [] 19:23:12 Resetting list of modified source files. Was [C:\Users\amanocha\Perforce\SM_11.0_Latest\sm_base\sm_base_core\src\main\java\com\ciena\aspects\logging\trace\LoggingAspectCombined.aj] 19:23:12 Preparing for build: planning to be an incremental build 19:23:12 Starting incremental compilation loop 1 of possibly 5 19:23:13 Timer event: 488ms: Time to first compiled message 19:23:13 Dropping back to full build 19:23:13 Preparing for build: not going to be incremental because no successful previous full build 19:24:9 Timer event: 56971ms: Time to first woven message 19:32:24 AspectJ reports build successful, build was: FULL 19:32:24 AJDE Callback: finish. Was full build: true 19:32:24 Timer event: 551638ms: Total time spent in AJDE 19:32:24 Timer event: 0ms: Refresh after build 19:33:22 Types affected during build = 8382 19:35:0 Timer event: 708239ms: Total time spent in AJBuilder.build() 19:35:0 Timer event: 10ms: Update visualizer, xref, advice listeners for (separate thread): SM11.0 19:35:1 Timer event: 988ms: Delete markers: SM11.0 (Finished deleting markers for SM11.0) 19:35:35 Timer event: 33645ms: Create markers: SM11.0 (Finished creating markers for SM11.0) 19:35:35 Created 23178 markers in 8356 files Log at 19:23:13 Preparing for build: not going to be incremental because no successful previous full build I think wrongly says that there was no successful previous full build as there were and I lost precious 12 minutes in that.
> 2.2.3.e42x-RELEASE-20130625-1400 That is a very old AJDT - are you not able to use the latest on Eclipse 4.4? > making a spell correction in one of the advice in one of the aspects. What kind of spelling correction? Was the aspect broken until you made the spelling correction? Or was it in a comment? Or in a literal? If you are changing code from a broken to a working state I might expect a full build. I just wrote an AJ test, created a source file and an aspect with a spelling error: public class Code { public static void run() { System.out.println("run() running"); } } aspect X { before(): execution(* run(..)) { System.out.println("advice runnning"); } } I then fixed the spelling error: aspect X { before(): execution(* run(..)) { System.out.println("advice running"); } } Only the aspect was compiled and woven. Now that was a regression test in AspectJ so I then created a project in AJDT with these files and repeated making the fix, event trace: :B: 15:26:12 =========================================================================================== :B: 15:26:12 Build kind = AUTOBUILD :B: 15:26:12 Project=456801, kind of build requested=Incremental AspectJ compilation :B: 15:26:12 Timer event: 0ms: Flush included source file cache :B: 15:26:12 Timer event: 0ms: Check delta :B: 15:26:12 File: /Users/aclement/workspaces/aspectj1/456801/src/X.java has changed. :B: 15:26:12 build: Examined delta - 1 changed, 0 added, and 0 deleted source files in required project 456801 :B: 15:26:12 Timer event: 0ms: Looking for and marking configuration changes in 456801 :B: 15:26:12 Configuration changes found: true :B: 15:26:12 Timer event: 0ms: Look for source/resource changes :B: 15:26:12 Setting list of classpath elements with modified contents: :B: 15:26:12 [] :B: 15:26:12 Timer event: 1ms: Pre compile :B: 15:26:12 Sending the following configuration changes to the compiler: [] :B: 15:26:12 1 source file changes since last build :B: 15:26:12 Compiler configuration for project 456801 has been read by compiler. Resetting. :B: 15:26:12 Configuration was [] :B: 15:26:12 Resetting list of modified source files. Was [/Users/aclement/workspaces/aspectj1/456801/src/X.java] :C: 15:26:12 Preparing for build: planning to be an incremental build :C: 15:26:12 Starting incremental compilation loop 1 of possibly 5 :C: 15:26:12 Timer event: 51ms: Time to first compiled message :C: 15:26:12 Timer event: 52ms: Time to first woven message :C: 15:26:12 AspectJ reports build successful, build was: INCREMENTAL :C: 15:26:12 AJDE Callback: finish. Was full build: false :B: 15:26:12 Timer event: 53ms: Total time spent in AJDE :B: 15:26:12 Timer event: 0ms: Refresh after build :C: 15:26:12 Types affected during build = 1 :B: 15:26:12 Timer event: 55ms: Total time spent in AJBuilder.build() :B: 15:26:12 Timer event: 1ms: Delete markers: 456801 (Finished deleting markers for 456801) :B: 15:26:12 Timer event: 1ms: Create markers: 456801 (Finished creating markers for 456801) :B: 15:26:12 Created 1 markers in 1 files :B: 15:26:13 Timer event: 0ms: Update visualizer, xref, advice listeners for (separate thread): 456801 showing only one file compiled again when I corrected the spelling mistake, the aspect. My event trace output is different to yours as I am using an up to date AJDT. I think the problem we have in your trace is the: 19:23:13 Dropping back to full build which has no explanation as to why, and I think that is what has been improved in more recent AJDTs, the explanation. > I think wrongly says that there was no successful previous full build as there were and I lost precious 12 minutes in that. It isn't wrong but I'll admit it is misleading, the comment here: 19:23:13 Preparing for build: not going to be incremental because no successful previous full build When the previous line said 'dropping back to full build' it wiped the compile state out as a full build was going to happen, then a check was made by some other part of the process for a build state, it couldn't find one and so printed that message (no build state is a sign of no successful previous build). There may be something more subtle in your aspect that is causing it to think a more serious change has occurred. You could try commenting out sections of your aspect until making the spelling correction causes only an incremental build, then we'll know the culprit construct. Or start with an empty aspect like mine and add pieces until you fail to get incremental builds.