Bug 498100 - Can't weave compiled aspects
Summary: Can't weave compiled aspects
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.8.9   Edit
Hardware: Macintosh Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-18 17:50 EDT by Eduard Matsukov CLA
Modified: 2016-07-27 14:46 EDT (History)
1 user (show)

See Also:


Attachments
ajc crash (39.86 KB, text/plain)
2016-07-18 17:50 EDT, Eduard Matsukov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eduard Matsukov CLA 2016-07-18 17:50:23 EDT
Created attachment 263174 [details]
ajc crash

I have two-step compilation with ajc:

1) compile only aj-sources, so no -aspectpath, -inpath paramenters. In -sourceroots only generated java-sources (annotation processors, etc.) and aj-files set.
2) weave hole project with a separate task, so no -sourceroots param, but -aspectpath and -path are lead to all the jars and build directories with .class files.

I got a crash in ajc :(

Maybe some point I lost?

Sorry for marking 'major', but this thing important in building development instrument for Android I'm working on :)
Comment 1 Andrew Clement CLA 2016-07-27 14:46:31 EDT
That error, in particular the:

org.aspectj.apache.bcel.classfile.ConstantFieldref cannot be cast to org.aspectj.apache.bcel.classfile.ConstantUtf8

suggests something else has modified the classfiles between step (1) producing them and step (2) reprocessing them.

Any kind of trip through some other tool maybe adversely affect the constant pool ordering and the encoded constant pool references in the aspectJ attributes will then be wrong. Are you sure there isn't another tool doing something in the meantime?