Community
Participate
Working Groups
The attached classfile caused the attached stacktrace during load time weaving via Equinox Aspects. Note that the Scala bundle doesn't directly use aspects (it uses org.eclipse.contribution.weaving.jdt) and no advice applies to it. I could provide (non-minimal) source but I suspect that the binary is more useful. I someone can tell me what bytecode construct is causing the weaver grief I should be able to put together minimal Scala source which reproduces the problem.
Created attachment 119000 [details] Failing classfile
Created attachment 119001 [details] Corresponding stacktrace
Adding Martin to the CC because this may also be equinox aspects related.
Seem to be 3 issues here: 1. Should the scala class have even been passed to the weaver. I don't think equinox aspects is providing enough control over which bundles get a weaver and which aspects apply to that bundle. (But there is another open bug already discussing the scope of bundle weaving) 2. The real message is swallowed when the AbortException is constructed so I can't see what was wrong with the bytecode to prevent it being handled by AspectJ correctly. 3. AspectJ doesn't like something in that bytecode. I can't seem to cause the failure locally by weaving a dumb aspect into the attached .class file. Not sure if that is due to an older version of AspectJ being used when it fails, or something else. I presume the pointcuts used in the org.eclipse.contribution.weaving.jdt bundle use within() to limit the matching scope? And not just a targeted execution() ?
To get around this problem, try using import-package instead of require-bundle for the jdt weaving plugin.
(In reply to comment #4) > I presume the pointcuts used in the org.eclipse.contribution.weaving.jdt bundle > use within() to limit the matching scope? And not just a targeted execution() > ? Not doing that. Thought that using execution would be enough to limit scope. If it would make weaving faster (and safer), I will.
execution() will limit scope to just the particular methods but it is not as efficient in terms of evaluation as a within() pointcut for dismissing types we don't need to touch.
downgrading urgency because appropriate usage of equinox aspects means the scala code doesn't need to be woven by AspectJ.