Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to weave scala-library.jar? #20

Open
colin-scott opened this issue Jun 2, 2015 · 0 comments
Open

Possible to weave scala-library.jar? #20

colin-scott opened this issue Jun 2, 2015 · 0 comments

Comments

@colin-scott
Copy link

I'm attempting to add before advice to a function within scala-library.jar.

It appears that the sbt-aspectj plugin is successfully weaving the jar. However, the weaved jar is somehow not getting loaded, despite the fullClasspath in Runtime <<= useInstrumentedClasses(Runtime) line in my build file.

For what it's worth, here is my build file, my aspectj file, and my test program.

To reproduce:

git clone -b test-ask git@github.com:NetSys/sts2-applications.git test-ask
cd test-ask
sbt debug run

Running it should print "WOOHOO" at the beginning. However, no such message appears.

Interestingly, the weaved classes are on the classpath. Moreover, as far as I can tell, there are no redundant classes on the classpath, i.e. there is one and only one of the class I'm trying to weave on the classpath.

I suspect that the scala runtime somehow loads its own scala-library, dynamically and without regard to the classpath.. Any insights?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant