Question

I was going through a fantastic talk by Alex and nearly all the things he spoke made sense to me except for the given thing.

Link

In a nutshell how does module manage versions. If I have a module v1 with a method with different implementation, a separate module v2 with a same method signature and return but a different implementation, how will the tooling resolve the dependency?

Thanks!

Was it helpful?

Solution

It won't, dependency-resolution is a non-goal for the Java Platform Module System (source):

Non-requirements

  • Multiple versions — It is not necessary to support more than one version of a module within a single configuration.
  • Version selection — The process of configuring a set of developer modules and JDK modules, in any phase, need not consider more than one version of any particular module.

In other words, we see no need to build yet another dependency-resolution mechanism. Maven, Ivy, and Gradle have all tackled this difficult problem. We should leave it to these and other build tools to discover and select a set of candidate modules for a given library or application; the module system need only validate that the set of modules selected by the build system satisfies each module’s dependences and version constraints.

OTHER TIPS

I can’t quite come up with proper link explaining this but adding module versioning is a non-goal for project Jigsaw.

Licensed under: CC-BY-SA with attribution
scroll top