Fork me on GitHub
#tools-deps
<
2019-11-26
>
Lone Ranger13:11:03

Good morning! Darn conj has me so full of ideas now 😮 So what does it take to hook into the tools-deps machinery? Is there a general primer-faq? Reason I'm asking is b/c I'm working with Chris Nuernberger on libpython-clj and I think it would be a very good idea to be able to specify Python deps declaratively. Is tools-deps designed to be extensible like that or should we use a seperate .edn file inspired by deps.edn?

dominicm13:11:09

It is extensible, but the clj tool currently doesn't define a way for extensions to be loaded

vlaaad13:11:42

I thinks it's not extensive in that direction. it's a tool to resolve java dependency and build java classpath, it probably can't be extended for other ecosystems such as python or js. they are too different.

Alex Miller (Clojure team)13:11:27

clj is about making classpaths so the question is whether there is any use in putting python stuff on a classpath

Lone Ranger13:11:42

So the use case here is for library authors using the libpython-clj tool

Alex Miller (Clojure team)13:11:54

You could use just the resolve-deps part with custom providers to do the transitive expansion

Lone Ranger13:11:28

There's a chicken/egg problem -- basically the Python VM needs to be loaded before any libpython-clj libraries can be pulled in

Alex Miller (Clojure team)13:11:32

Unclear if that’s worth doing via tolls deps

Lone Ranger13:11:13

Of course! I was't sure if it was designed for that or not

Alex Miller (Clojure team)13:11:51

I don’t know enough about python stuff to tell but the provider extensions are pretty generic so it could probably be made to work, just not sure if it’s worth doing

orestis14:11:44

Python has literally a PYTHONPATH which is pretty similar to the classpath. But in practice I think people don’t do that. The Python community changed the “de-facto” dependency manager 4 times in the last 5 years already (I haven’t looked deeply into python rencetly, might be wrong).

dominicm15:11:56

I think they still use the same repo though don't they?

dominicm15:11:07

The real question is: - How does libpython-clj search for python code? It could search the classpath, jruby can. - How does graal python find python code? Those are the two consumers I can think of.