Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Weaving messages on the command line.

Hi,

any news on this topic?

(I am missing the code for the output mentioned below in the cvs head... ;-)

Best regards,
-Martin



Andrew Clement wrote:

I'm working on (yet another) bug. This one (#36747) describes a long requested feature to get weaving information via messages.

I've implemented a first stab at it - here is an example weaving the AspectJ tjp example.

C:\aspectj1.1\doc\examples\tjp>ajc -verbose *.java
zipfile classpath entry does not exist: c:\jvms\sun142_03\jre\lib\i18n.jar
directory classpath entry does not exist: c:\jvms\sun142_03\jre\classes
compiling C:\aspectj1.1\doc\examples\tjp\Demo.java
compiling C:\aspectj1.1\doc\examples\tjp\GetInfo.java
weaving
might need to weave [UnwovenClassFile(C:\aspectj1.1\doc\examples\tjp\Demo.class, tjp.Demo), UnwovenClassFile(C:\aspectj1.1\doc\examples\tjp\GetInfo.class, tjp.G
etInfo)](world=true)
weaving GetInfo.java
weaving info: GetInfo.java:18 has intertype declaration from GetInfo.java:18
weaving Demo.java
weaving info: Demo.java:16 has intertype declaration from GetInfo.java:18
weaving info: Demo.java:20 advised by GetInfo.java:26
weaving info: Demo.java:24 advised by GetInfo.java:22
weaving info: Demo.java:30 advised by GetInfo.java:26
weaving info: Demo.java:34 advised by GetInfo.java:26

The new information is:
- a 'weaving XXX' message so weaving is consistent with the
  'compiling XXX' messages that are currently produced.
- a 'weaving info:' message per piece of advice or intertype
  declaration in effect.

Note:
For intertype declarations, as the type munger don't seem to remember
their source location (at the moment), the line number in the 'from XXX:XX' message points to the line that declares the type.


The questions I have that I'd appreciate input on:

- All these new messages come out if -verbose is on.  Is that ok or
  would people prefer a new option on ajc?  -showweaveinfo is the
  very poor possible option I came up with.

- What extra information would you like to know in the message?  Is
  it useful to know the types within the files that are involved?
  (I know you are going to say yes, I don't know why I'm asking)

- Currently the message type for the weaving info message is IMessage.INFO - shall we have an IMessage.WEAVEINFO type?

Any other comments welcome too ...

thanks,
Andy.

===
Andy Clement
AspectJ/AJDT Development

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Back to the top