Use the language plugin's class loader to load all its jar files (3)
See the TODO in StrategoObserver.java. Doing so currently seems to cause Spoofax/321. It may well be that the current approach, introduced in r21475 (now commented out), only works before a plugin is actually deployed.
Submitted by Lennart Kats on 14 December 2010 at 15:06
Issue Log
It would be helpful to know if this bug, that appears in 0.6.0.1, also occurs with a source version of the webdsl plugin. That would tell us if it’s a problem specific to the plugin configuration of the webdsl plugin, or if it is actually a problem with deployed plugins.
Sander confirmed that indeed this problem only occurs with the deployed webdsl plugin, not with the plugin in source form. So it is a post-deployment issue, and it may or may not be specific to webdsl (likely not).
fixed in revision r24813+r24820
also see Spoofax/522
So I didn’t realize until now that buddy class loading doesn’t solve the problem in case you build to jar rather than ctree. I’m going to try to combine our solutions and hopefully solve this problem for good.
This fixed it: https://github.com/metaborg/spoofax/commit/1dbb44624e789f5b1d7154aedc3c3576fdf403fa
Now everything works before/after deployment with jar/ctree.Note: this extra code is only needed for Java compilation and does not affect the result of the build. We still rely on buddy class loading during runtime.
It’s a bit of a hack so if you have a better idea then let me know.There’s one special case you should be aware of, which is if you want to use a plug-in that is not installed in Eclipse but is located in your workspace instead.
For testing purposes, you’ll need to run a second Eclipse instance or you’ll get ClassNotFoundExceptions. In addition, if you’re building to jar, you’ll need to make a jar of your plug-in and put it ineclipse.home/plugins/
or put it on the classpath in some other way.
Log in to post comments