4 ms·
I've never liked the hacks around loading multiple versions of the same library. To me, this seems fragile and bloated workaround, and it would be far better to
by cromwellian 10y ago
I've never liked the hacks around loading multiple versions of the same library. To me, this seems fragile and bloated workaround, and it would be far better to encourage people to fix their dependencies. In other ecosystems where they can't abuse a classloader, this kind of multi-version dependency is discouraged, and at Google we completely ban it for Java.
- sk5t 10y ago> this kind of multi-version dependency is discouraged, and at Google we completely ban it for Java Good to hear. It takes a surprising lot of backbone to resist the call to "just do" tortured things to fix a problem--sometimes I play the bad guy, saying "no, that's stupid, figure out a better way" but yet we see repackaged Java classes shipping here and there...
- _pmf_ 10y ago> In other ecosystems where they can't abuse a classloader That's not abusing the classloader; it's using the classloader. > and at Google we completely ban it for Java Yeah, I'll sure to listen to Java tips from the developers of the Android API.
- cromwellian 10y agoWell, we also developed Guava, so karma balanced. :)
- chopin 10y agoI would be interested to learn how you cope with indirect dependencies (i.e. dependencies brought in by your dependencies). I often have to deal with the situation that both of my dependencies A and B require Y but in different versions. Neither A nor B offer versions where the dependency on Y is compatible (or the same).
- lvh 10y agoThat's fair, but people do have them, and they're a big part of the reason Jigsaw is suggested to be too big to fail.