-
-
Notifications
You must be signed in to change notification settings - Fork 926
removing LoadService#findLibraryWithClassloaders #1957
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0e7925f
to
4f28d3c
Compare
9214912
to
3c40d9a
Compare
… handle those jar (and its ruby script content) explicitly with the JRubyClassloaderResource each required jar will be add to LOAD_PATH using jar:file: protocol URIs. with this all Dir glob, etc will work on those jars and its embedded ruby scripts.
…ttached "jars" can be found via the Thread.currentThread.contextClassLoader which means all ruby scripts will be found through this pass. running jruby from other environments like servlets just leave the context classloader as parent. Dir-glob does not work in general with the Thread.currentThread.contextClassLoader and this would also shadow the LoadPath entries for the attached jars since the context-classloader gets inspect first finally it keeps the classloader semantic uniform wether executed from commandline or inside a j2ee container or osgi framework
…o avoid finding it on the classpath and loadpath
* add property/config to switch back to legacy loading * use uri:classloader: protocol for setting jruby.home * give preference to RubyInstanceConfig.class.getClassLoader instead of Thread.currentThread.contextClassLoader
…e right classloader
3c40d9a
to
6dddafb
Compare
* do not assume URL.openstream is NOT null - happens with knoplerfish-osgi framework
* allow to run single integration test with mvn -Pmain -Dinvoker.test=integrety
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
the main idea is to reuse the current LibrarySearcher.
loading the kernel can be achieved by adding the root of the main classloader (the one which contains jruby-stdlib + jruby-core) to the LOAD_PATH
to expose ruby scripts inside required jar-files they just gets added to LOAD_PATH as well, using the jar:file: protocol
there are still some loose ends, also see travis:
my thoughts about requiring jars and "adding them to the LOAD_PATH":
it would be nice if all those features would work the same for all the different environments:
but testing them only for the "commandline" case is not enough and nesting jars inside jars inside jars is problematic with more complex java frameworks.