[aspectj-users] Simple changes in java source file causes re-compilation of all dependent files in AJDT?

2011-04-28 Thread Jonathan Su
Hi there,

I'm currently using Eclipse 3.6.2 with AJDT 2.1.2 (which comes with
AspectJ 1.6.11), with incremental compilation turned on. There are a
couple of aspects advising the java sources as well as some third
party aspects (primarily those from Spring).

I'm noticing in AJDT event trace view that when I change and save some
java source files (not the aspect source files), it first compiles the
changed file, then it proceed to recompile all source files that
import the changed file. Then it recompiles files that are dependent
on the recompiled files, so on and so forth. For some other source
files, It doesn't seem to do this as it only recompiles the saved
file.

AJDT event trace reports successful incremental build - it compiles
the single changed file, then it hits "Examining whether any other
files now need compilation based on just compiling: "
and proceed to report that it needs to recompile all the files that
reference the changed file. It then does this for 4 more iterations.

Why is that? Why does it need to recompile all dependent source files
when all I've changed is a whitespace or comment? Please note that I
am not changing the aspects or pointcuts here at all. What am I
missing? Has anyone else encountered this?

Because of this behavior, merely adding a whitespace or changing
comment causes a wait time for build, which is a behavior not present
with JDT projects.

Thanks so much for your help.
Jonathan
___
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Re: [aspectj-users] Simple changes in java source file causes re-compilation of all dependent files in AJDT?

2011-04-28 Thread Andy Clement
Hi Jonathan,

> Why is that? Why does it need to recompile all dependent source files
> when all I've changed is a whitespace or comment? Please note that I
> am not changing the aspects or pointcuts here at all. What am I
> missing? Has anyone else encountered this?

If more than just the file you are changing gets compiled after making
a whitespace change that usually indicates a bug.  We have fixed many
of these over the years but there are still some lurking and some
characteristic of your project/source is triggering the problem.
Please raise a bugzilla for it:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ

Ideally sharing the source with me will be the fastest way to get it
resolved, but if that isn't possible perhaps we can narrow down the
problem:
- if you comment out the aspects (or pieces of them) does it still happen?
- anything unique about the file you are changing compared to others?
Is it affected by aspects, if so, what kind of advice/itds/declares.
Do you have inner classes? are they anonymous?

cheers
Andy

On 28 April 2011 12:28, Jonathan Su  wrote:
> Hi there,
>
> I'm currently using Eclipse 3.6.2 with AJDT 2.1.2 (which comes with
> AspectJ 1.6.11), with incremental compilation turned on. There are a
> couple of aspects advising the java sources as well as some third
> party aspects (primarily those from Spring).
>
> I'm noticing in AJDT event trace view that when I change and save some
> java source files (not the aspect source files), it first compiles the
> changed file, then it proceed to recompile all source files that
> import the changed file. Then it recompiles files that are dependent
> on the recompiled files, so on and so forth. For some other source
> files, It doesn't seem to do this as it only recompiles the saved
> file.
>
> AJDT event trace reports successful incremental build - it compiles
> the single changed file, then it hits "Examining whether any other
> files now need compilation based on just compiling: "
> and proceed to report that it needs to recompile all the files that
> reference the changed file. It then does this for 4 more iterations.
>
> Why is that? Why does it need to recompile all dependent source files
> when all I've changed is a whitespace or comment? Please note that I
> am not changing the aspects or pointcuts here at all. What am I
> missing? Has anyone else encountered this?
>
> Because of this behavior, merely adding a whitespace or changing
> comment causes a wait time for build, which is a behavior not present
> with JDT projects.
>
> Thanks so much for your help.
> Jonathan
> ___
> aspectj-users mailing list
> aspectj-users@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
___
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users


[aspectj-users] AUTO: Neil P Wall is out of the office (returning 03/05/2011)

2011-04-28 Thread Neil P Wall

I am out of the office until 03/05/2011.

I am on vacation  returning on Tuesday 3rd May 2011.  I will respond to
your message as soon as I can.

Thank you.

Regards,

Neil Wall


Note: This is an automated response to your message  "aspectj-users Digest,
Vol 74, Issue 11" sent on 28/4/11 17:00:24.

This is the only notification you will receive while this person is away.

___
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Re: [aspectj-users] Simple changes in java source file causes re-compilation of all dependent files in AJDT?

2011-04-28 Thread Jonathan Su
Hi Andy,

Thanks for the prompt response!

> Ideally sharing the source with me will be the fastest way to get it
> resolved, but if that isn't possible perhaps we can narrow down the
> problem:
> - if you comment out the aspects (or pieces of them) does it still happen?
> - anything unique about the file you are changing compared to others?
> Is it affected by aspects, if so, what kind of advice/itds/declares.
> Do you have inner classes? are they anonymous?

To answer your questions:
- I commented all of my aspects and removed the Spring aspects jars
from aspect path, did a clean in Eclipse, and verified that the source
class in question does not have any advised-by markers for all of its
methods. This re-compilation behavior is still happening, and the
event trace reports the same set of referenced files being recompiled.
- The file in question is one of the commonly used "service" classes
(ex: perform business logic) and the methods are advised by several
aspects prior to commenting out the aspects. This behavior seems to
happen for other commonly used "service" classes as well. This
behavior does not seem to happen when I modify "bean" style classes
(ex: basic object representation that contains mostly
getters/setters). These "beans" are heavily referenced/imported
throughout the code but its methods are mostly just getters/setters
(and usually not advised by aspects).
- The aspects I'm using are typical around advices that are scoped to
either the project packages (using within) and/or to the presence of
annotations, as well as the standard spring aspects (ex:
transactions). There is also a before advice with similarly scoped
pointcut.
- There are some inner classes throughout the project, and a few
anonymous ones. However, there are neither of those in the source file
in question.

Here's some additional information from AJDT event trace:
   AJDT version: 2.1.2.e36x-20110307-1000 for Eclipse 3.6
   AspectJ Compiler version: 1.6.11.RC1
   usingVisualiser=true
   usingXref=true
   usingCUprovider=true
   org.aspectj.ajdt.core.compiler.weaver.XNoInline = true
   ajde.version.at.previous.startup = @AJDEVERSION@
   org.aspectj.ajdt.core.compiler.problem.suppressWarnings = enabled
   org.eclipse.ajdt.internal.ui.tracing.checked.filters = set: Compiler,Builder
   org.aspectj.ajdt.core.compiler.lint.adviceDidNotMatch = ignore

13:34:33 Build kind = AUTOBUILD
13:34:33 Project=, kind of build requested=Incremental
AspectJ compilation
13:34:33 Timer event: 0ms: Flush included source file cache
13:34:33 Timer event: 4ms: Check delta
13:34:33 File:  has changed.
13:34:33 build: Examined delta - 1 changed, 0 added, and 0 deleted
source files in required project 
13:34:33 Timer event: 5ms: Looking for and marking configuration
changes in 
13:34:33Configuration changes found: true
13:34:33 Timer event: 5ms: Look for source/resource changes
13:34:33 Setting list of classpath elements with modified contents:
13:34:33   []
13:34:33 Timer event: 13ms: Pre compile
13:34:33 Sending the following configuration changes to the compiler: []
13:34:33 1 source file changes since last build
13:34:33 Compiler configuration for project  has been read by
compiler.  Resetting.
13:34:33  Configuration was []
13:34:33 Resetting list of modified source files.  Was []
13:34:33 Preparing for build: planning to be an incremental build
13:34:33 Starting incremental compilation loop 1 of possibly 5
13:34:34 Timer event: 182ms: Time to first compiled message
13:34:34 Timer event: 258ms: Time to first woven message
13:34:34 Examining whether any other files now need compilation based
on just compiling: '{}'
...
determines "Need to recompile" all the referenced files
...
13:34:34 Starting incremental compilation loop 2 of possibly 5
13:34:35 Examining whether any other files now need compilation based
on just compiling: '{recompiled files}'
...
so on and so forth to loop 5 of 5
...
13:34:47 AspectJ reports build successful, build was: INCREMENTAL
13:34:47 AJDE Callback: finish. Was full build: false
13:34:47 Timer event: 13840ms: Total time spent in AJDE
13:34:47 Timer event: 0ms: Refresh after build
13:34:47 Types affected during build = 216
13:34:47 Timer event: 13890ms: Total time spent in AJBuilder.build()
13:34:47 Timer event: 20ms: Delete markers: 
13:34:47 Timer event: 5ms: Update visualizer, xref, advice listeners
for (separate thread): 
13:34:49 Timer event: 1913ms: Create markers: 
13:34:49 Created 1148 markers in 216 files

I will go ahead and raise a bugzilla. Please let me know if there's
any other information I can provide.

Thanks so much,
Jonathan

On Thu, Apr 28, 2011 at 12:42 PM, Andy Clement  wrote:
> Hi Jonathan,
>
>> Why is that? Why does it need to recompile all dependent source files
>> when all I've changed is a whitespace or comment? Please note that I
>> am not changing the aspects or pointcuts here at all. What am I
>> missing? Has anyone else encountered this?
>
> If more than just the file you are 

Re: [aspectj-users] Simple changes in java source file causes re-compilation of all dependent files in AJDT?

2011-04-28 Thread Jonathan Su
Hi Andy,

An additional clarification:

I'm noticing that this re-compilation of dependent classes behavior
seems to happen only for classes with methods that are advised by some
aspects. I'm not sure why it still happened when I commented out all
the aspects and did an Eclipse clean.

Thanks,
Jonathan

On Thu, Apr 28, 2011 at 2:17 PM, Jonathan Su  wrote:
> Hi Andy,
>
> Thanks for the prompt response!
>
>> Ideally sharing the source with me will be the fastest way to get it
>> resolved, but if that isn't possible perhaps we can narrow down the
>> problem:
>> - if you comment out the aspects (or pieces of them) does it still happen?
>> - anything unique about the file you are changing compared to others?
>> Is it affected by aspects, if so, what kind of advice/itds/declares.
>> Do you have inner classes? are they anonymous?
>
> To answer your questions:
> - I commented all of my aspects and removed the Spring aspects jars
> from aspect path, did a clean in Eclipse, and verified that the source
> class in question does not have any advised-by markers for all of its
> methods. This re-compilation behavior is still happening, and the
> event trace reports the same set of referenced files being recompiled.
> - The file in question is one of the commonly used "service" classes
> (ex: perform business logic) and the methods are advised by several
> aspects prior to commenting out the aspects. This behavior seems to
> happen for other commonly used "service" classes as well. This
> behavior does not seem to happen when I modify "bean" style classes
> (ex: basic object representation that contains mostly
> getters/setters). These "beans" are heavily referenced/imported
> throughout the code but its methods are mostly just getters/setters
> (and usually not advised by aspects).
> - The aspects I'm using are typical around advices that are scoped to
> either the project packages (using within) and/or to the presence of
> annotations, as well as the standard spring aspects (ex:
> transactions). There is also a before advice with similarly scoped
> pointcut.
> - There are some inner classes throughout the project, and a few
> anonymous ones. However, there are neither of those in the source file
> in question.
>
> Here's some additional information from AJDT event trace:
>   AJDT version: 2.1.2.e36x-20110307-1000 for Eclipse 3.6
>   AspectJ Compiler version: 1.6.11.RC1
>   usingVisualiser=true
>   usingXref=true
>   usingCUprovider=true
>   org.aspectj.ajdt.core.compiler.weaver.XNoInline = true
>   ajde.version.at.previous.startup = @AJDEVERSION@
>   org.aspectj.ajdt.core.compiler.problem.suppressWarnings = enabled
>   org.eclipse.ajdt.internal.ui.tracing.checked.filters = set: Compiler,Builder
>   org.aspectj.ajdt.core.compiler.lint.adviceDidNotMatch = ignore
>
> 13:34:33 Build kind = AUTOBUILD
> 13:34:33 Project=, kind of build requested=Incremental
> AspectJ compilation
> 13:34:33 Timer event: 0ms: Flush included source file cache
> 13:34:33 Timer event: 4ms: Check delta
> 13:34:33 File:  has changed.
> 13:34:33 build: Examined delta - 1 changed, 0 added, and 0 deleted
> source files in required project 
> 13:34:33 Timer event: 5ms: Looking for and marking configuration
> changes in 
> 13:34:33        Configuration changes found: true
> 13:34:33 Timer event: 5ms: Look for source/resource changes
> 13:34:33 Setting list of classpath elements with modified contents:
> 13:34:33       []
> 13:34:33 Timer event: 13ms: Pre compile
> 13:34:33 Sending the following configuration changes to the compiler: []
> 13:34:33 1 source file changes since last build
> 13:34:33 Compiler configuration for project  has been read by
> compiler.  Resetting.
> 13:34:33      Configuration was []
> 13:34:33 Resetting list of modified source files.  Was []
> 13:34:33 Preparing for build: planning to be an incremental build
> 13:34:33 Starting incremental compilation loop 1 of possibly 5
> 13:34:34 Timer event: 182ms: Time to first compiled message
> 13:34:34 Timer event: 258ms: Time to first woven message
> 13:34:34 Examining whether any other files now need compilation based
> on just compiling: '{}'
> ...
> determines "Need to recompile" all the referenced files
> ...
> 13:34:34 Starting incremental compilation loop 2 of possibly 5
> 13:34:35 Examining whether any other files now need compilation based
> on just compiling: '{recompiled files}'
> ...
> so on and so forth to loop 5 of 5
> ...
> 13:34:47 AspectJ reports build successful, build was: INCREMENTAL
> 13:34:47 AJDE Callback: finish. Was full build: false
> 13:34:47 Timer event: 13840ms: Total time spent in AJDE
> 13:34:47 Timer event: 0ms: Refresh after build
> 13:34:47 Types affected during build = 216
> 13:34:47 Timer event: 13890ms: Total time spent in AJBuilder.build()
> 13:34:47 Timer event: 20ms: Delete markers: 
> 13:34:47 Timer event: 5ms: Update visualizer, xref, advice listeners
> for (separate thread): 
> 13:34:49 Timer event: 1913ms: Create markers: 
> 13:34:49 Created 11

[aspectj-users] Setup older compiler/runtime (1.6.8, v6 attributes) in Eclipse

2011-04-28 Thread Brett Randall
Hi,

I'm using a current Eclipse version, so I've picked-up
AspectJ/ajc1.6.11 in my development environment.  In my runtime
environment I'm stuck with 1.6.8 for now, so as expected on deployment
I'm seeing a v6 versus v7 version clash, per [1].  Unfortunate,
runtime is only one revision too old for v7 attributes.

Given I can't follow the recommendation to upgrade my runtime version,
how difficult is it to setup my Eclipse IDE to use the 1.6.8 compiler
(perhaps referenced externally)?  Is there a HOWTO on downgrading
Eclipse IDE AJDT kit?  I'm hoping not to have to hunt down an older
version of Eclipse.

Thanks
Brett

[1] http://andrewclement.blogspot.com/2010/04/aspectj-169m1-message-unable-to.html
___
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users