-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add support for module bundles #2432
Conversation
A good use case is With this new feature it becomes easy as: public Iterable<? extends Module> getDependencies() {
return singletonList(new Jdk8Module());
} |
This is kind of change that should ideally be discussed on dev mailing list first; or, if not, first filing an issue explaining approach. It is not an absolute requirement (it is possible to use PR id in release notes). As to change itself, I am not sure what to think: I can see possible benefits at high level, but not yet practical ones. In case of |
Sorry, I opened the PR for discussion and for demonstrating a proof of concept. In our case, we've several modules that depend on the Jdk8Module. We also have modules that depend on other modules, e.g.:
When you split the serialization modules into fine-grained modules, it's much easier to declare the dependencies at the module level rather than declaring the dependency every time you have to use it. |
Ok. I will have to think about this a bit more. I can see potential value here, just want to think through ramifications. Would it make sense for you to ask about this on mailing list; just to see if others would find this immediately useful? And there might be some useful additional/related ideas. I am not asking for any vote of approval or such, just... some more sanity checking. |
I've fixed the mentioned issues. I'll drop an email to gather more feedback. |
Cool, sounds good. I like this idea in that it's something I had not thought of, but seems to solve an existing issue. And concept of granular modules is pretty cool -- the only concern I have is that the solution both works and is extensible (if need be), and does not add new failure modes. |
Hope to see it as part of 2.10 :) |
@cowtowncoder let me know if you need any further help with this PR. |
Will do -- right now I am only limited by time, but should be getting this merged this week. |
Merged, will be in 2.10.0. Thank you for contributing this! |
This PR adds support for module bundles.
This feature is useful in cases where you have explicit dependencies on other modules, but you have to ensure that these dependencies will be registered as well, making it easier to depend on them without worrying about transitive dependencies.
I propose making it a built-in feature, rather than a composite module in the userland, due to the module deduplication feature that would be not able to detect the aggregated modules.