Hacker News new | ask | show | jobs
by pkolaczk 4319 days ago
Just by reading the title I expected this would be about fixing the dependency diamond problem. I.e. when library A needs library C 1.0 and B needs library C 1.1 incompatible with C 1.0 and then libraries A and B meet in the same project :(
2 comments

In Java-land, OSGi was invented to solve this very problem. Every module has its own classloader so module A can load C 1.0 and module B can load C 1.1. Modules are registered and other modules can look them up in the registry and call them so A can look up and then call B without conflicts.
OSGi is good in theory but too much ado for most real-world projects.
Agreed. The Spring support helps a lot though. But there's no question that OSGi is one of the final big xml holdouts in Java-land.
The author is actually working on implementing a solution to that in ghc/cabal as well!