I spent a ton of time tonight in classpath hell. Basically, Apache Spark, Cassandra, and Cassandra Unit, and Guava, Jackson JSON, and Jetty have an INSANE dependency graph. They're all trampling on each other with broken dependencies. This results in a lot of <exclusion> work to get them to use sane bindings.
And it’s not necessarily anyone’s fault. Library A will use library B which depend on library C version 1.1 but then library D will use library C which depends on 1.2… I *mostly* end up with NoClassDefFoundException. But I’m worried about other smaller bugs. For example, if my library wasn’t tested with a later version of a library it isn’t necessarily as reliable out of the box since it wasn’t tested with that config. Has anyone done any work with only allowing a library to use the version of a class it requested? If you release your library fully tested on version 1.1.1 of some library, and someone accidentally starts using 1.1.2 becuase of dependency hell, then we're going to break the build and introduce bugs. So what would happen is every dependency would only be sourced from the version you require. This could be done via a hierarchical class loader. Of course this would probably end up burning up some memory but probably worth it. The main issue, is it WORTH it.. would this introduce new bugs? For example, it’s possible that libraries could step on each other by creating duplicate threads with the same names, or messing up system properties. -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile <https://plus.google.com/102718274791889610666/posts> <http://spinn3r.com>
