--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Isolated dependency loading is not possible in the JVM without complex ClassLoader-based schemes like OSGI, which come with their own set of problems.
-S
--
Maybe we could try to develop towards some kind of lightweight dependency loading system that avoids this problem?
I believe "lightweight dependency loading system" is an oxymoron. Either you A) design a new module format and try to get everyone to follow it (OSGI) or B) build an ad-hoc solution that tries to guess at the right behavior (JBoss). Either way, application developers still have a mess to deal with, just with an added layer of complexity.
If someone out there can fix this problem once and for all, I will buy you a drink. But you can't bill me for all the drinks you'll need along the way. ;)
Any suggestions?
It's really not difficult to do if you limit yourself to Clojure since
Clojure namespaces are first-class and easy to manipulate at
run-time. We implemneted a prototype of this in under two hours at a
Seajure meeting a while back:
https://github.com/technomancy/metaverse
However, it's significantly more difficult to do for arbitrary Java bytecode.
Neither of these snarky answers solve the problem. I just spent an entire week updating modules from version of a library that expected a seq of maps to one that expected map of seqs of maps. The very nature of data implies a format. If that format changes you have a compatibility issue no fancy namespace system can solve.
Timothy
--
Are Common Lispers actively suffering under this problem?
Based on a recent thread about "utility" libraries, I would like to
take this opportunity to ask everyone to help us avoid the dependency
mess that Common Lisp has gotten into, where there are over a dozen
such "convenience" libraries[1].
By all means, use these libraries in your *applications* if you find
them useful. But please don't make your *libraries* depend on them
unless you really need to.
Doing this will help application developers who want to use your
library. For example, if my application depends on libraries A, B, and
C, I might end up with transitive dependencies on three different
"utility" libraries. If I want to add library D which depends on an
incompatible version of one of those utilities, I'm stuck. By
adding to the dependencies of your library, you increase the
likelihood of dependency conflicts for consumers.
The ideal number of dependencies for a library release (not counting
Clojure itself) is zero. Obviously, use common sense. If your library
relies on critical functionality in another library, then make the
dependency. But if you can get by without the dependency (even if that
means copying some of those "utility" functions into your own code and
making them private) then you will make life easier for consumers of
your library.
Thanks, and happy coding.
-S
[1]: http://cliki.net/Convenience%20library
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/WuS31RSiz_A/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
--
This sets things up so r/ refers either to the rhizome.viz namespace, or if it is not installed, my dummy instaparse.viz-not-found namespace. The instaparse.viz-not-found contains stubs for all the functions from rhizome that I use; the stubs simply throw a friendly error message saying to add rhizome to the project's dependencies.(try(require '[rhizome.viz :as r])(catch Exception e(require '[instaparse.viz-not-found :as r])))