Open guan-kevin opened 1 month ago
Maybe this is somehow similar or related to #285. I can reproduce this behaviour back until at least 1.8.13, i.e. it is not a new thing and dates back to when I was just a simple AspectJ user, not a contributor to the project yet.
Judging from this test configuration file, not using aj.weaving.cache.impl
at all defaults to aj.weaving.cache.impl=perloader
, which seems to be correct according to my quick experiments. If the cache ever worked for that case when used repeatedly and "just" broke a long time ago or if it never worked to begin with, is yet to be established. I admit that I never use the weaving cache myself, so I need to dig into this at some point. This is just my first feedback.
Please note my recent message to the aspectj-users and aspectj-announce mailing lists regarding my situation as an AspectJ maintainer.
in
src/MyAspect.aj
In
src/foo.java
In
classes/META-INF/aop.xml
Running the command
java -javaagent:path/to/aspectjweaver.jar -Dorg.aspectj.weaver.showWeaveInfo=true -Daj.weaving.cache.enabled=true -Daj.weaving.cache.dir=/tmp/aspectj-cache/ -cp classes Foo
twice will lead to the following error
However, if I set cache implementation to
shared
, then it will work as expected:java -javaagent:path/to/aspectjweaver.jar -Dorg.aspectj.weaver.showWeaveInfo=true -Daj.weaving.cache.enabled=true -Daj.weaving.cache.dir=/tmp/aspectj-cache/ -Daj.weaving.cache.impl=shared -cp classes Foo
Is this a bug? And what does this
-Daj.weaving.cache.impl=shared
shared implementation option do?