Hi,
(sorry if you get this twice, I had problems with my list subscription)
I’d love to be more deeply involved in this discussion. It’s something
I’ve been struggling with a lot since most of the gems I build work on
top of Java libraries.
About Rubygems: don’t get me wrong, I’m not saying I want Rubygems to
handle gem activation, I’m saying that for any solution to succeed
Rubygems needs to be involved in the install-time dependency resolution.
Everyone uses Bundler for version management, and many use RVM for
sandboxing, but those work on top of Rubygems dependency resolution
(whether or not Bundler is there managing exactly which versions gets
installed). I may not have gotten the exact technical definitions
correct there, but I hope you can parse out what I’m getting at.
In my opinion JRuby must be able to to the following, out of the box:
install all dependencies for a gem, including any JAR/Maven/whatever
dependencies of gems that the gem depends on.
This means that if gem A depends on JAR X, and gem B depends on gem A,
then installing B will install X, without the user having to specify
that X is needed.
Adding Bundler, or some other tool, into the mix, it can help making
sure no incompatible versions end up getting installed, or required in a
bad order – but the important thing is that the JAR got installed, and
that the user didn’t have to specify that a dependency of A has to be
installed when she installs B.
Consider a similar situation: Bundler has an awesome feature that lets
you specify a git repository as the source of a gem. However, the gem in
that repository cannot in turn depend on another git repository, because
Rubygems doesn’t support the feature, and Bundler doesn’t replace
Rubygems (for example, Bundler could look for a Gemfile in the
repository and discover transitive dependencies that way, but it
doesn’t). This means that if you want to live on the bleeding edge and
install a gem from a repository, and have all its dependencies installed
from their respective repositories, you have to specify all of the
dependencies in your Gemfile, and all the dependencies of all of the
dependencies (and so on) too.
Focusing on Bundler, JBundler, or LockJar or any other tool like that
does not solve that problem, unless we want to invent a parallel
dependency management environment to Rubygems. Being able to do what
Bundler can do with git repositories is trivial, what is needed is
something that handles the transitivity of installation, not just the
transitivity of version resolution.
The proposal to use the “requirements” property in gemspecs is nice,
because it works with Rubygems, but in my opinion it needs to go into
Rubygems itself, or at least into JRuby so that it works out of the box.
LockJar and JBundler are nice, but this problem needs to be solved at a
lower level.
T#