-
-
Notifications
You must be signed in to change notification settings - Fork 925
Modularize all the things #8455
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
Open
headius
wants to merge
24
commits into
jruby:master
Choose a base branch
from
headius:module_stuff
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
* Use newer backport9 to access Java 8 StackWalker * Add module-info for modules we require * Copy jruby-base jar and deps into lib/modules * Modify jruby.bash to handle unshaded jruby and deps as classpath or module path entries * Restructure build for module-info.java There's a remaining issue here to build: CallSite and Main have sibling packages with the same name as lowercase, and that appears to be rejected by the build currently.
Ant is no longer maintained, and as a result there's no module- based version of its jar. We must move this out to a separate library that can be used at build time, such as during JRuby's own uses of the Rake ant targets.
We only have this dependency due to the @generated annotation we add to some generated sources, but neither we nor anyone else ever consumes that annotation.
Default scope for copy-dependencies is "test", which copies all runtime, provided, and test dependencies. We only want runtime in lib/modules.
This patch makes it possible to boot JRuby fully modularized. A few notes: * The org.jruby.base module is now open, because I was too lazy to individually open all of the Ruby kernel paths and there is no way to open them recursively from module-info. * Ruby "kernel" sources have been moved into org.jruby.kernel to aid in accessing them in a module-friendly way. This does, unfortunately, result in paths like org/jruby/kernel/kernel/kernel.rb. An alternative name may be in order.
Using lookup() appears to return a Lookup object that is stricter about access restrictions from a parent module to a child classloader with no module. In this case, the variables in the reified object classes are to be wired up in accessors. Using the lookup() version results in an error: java.lang.IllegalAccessException: symbolic reference class is not accessible: class org.jruby.gen.RubyObject5, from class org.jruby.specialized.RubyObjectSpecializer (module org.jruby.base)
Without this you cannot incrementally build. For some reason clean build still works.
* Drop another Ant reference in favor of Java 11 Files.readString. * Remove unnecessary and absent java.xml.ws.annotation module.
This was added as a dependency prior to modularization, but the modularization work was rebased on top of a more recent version.
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.
Rebased modularity code atop recent 10-dev.
See #6598.