Fork me on GitHub
#tools-deps
<
2019-01-24
>
dominicm07:01:08

That's really neat.

plexus07:01:19

has anyone already come up with a thing that reloads deps.edn, adding any newly added libraries to the classpath?

dominicm08:01:26

Alex's add-lib would probably be pliable to that. If you build it, I would be interested.

thheller09:01:41

FWIW I have done a few experiments with dynamically adding dependencies at runtime for shadow-cljs

thheller09:01:17

the only case where this works reliably is when adding dependencies that don't depend on anything different than what is already loaded

thheller09:01:27

as soon as there are any version conflicts things get icky

thheller09:01:14

eg. lib-a depends on X version 1.0.0 and is loaded. lib-b wants to be added but would cause X version 1.2.0 to be loaded instead of 1.0.0 if constructed normally

thheller09:01:38

since we can't easily unload version 1.0.0 you might now not be able to load properly

thheller09:01:04

unfortunately that scenario is quite common for bigger libs

thheller09:01:13

works well enough for simple libs without deps though

thheller09:01:50

gets even more complicated when accounting for npm deps 😉

plexus09:01:56

I'm guessing pomegranate/alembic and friends also have this issue then

thheller09:01:23

deps resolves version conflicts slightly differently so it is more prone to this

thheller09:01:30

but yes same issue is present everywhere