FYI my problem is fixed now. I believe something was wrong with my .m2/repository
Cool
Heya @alexmiller I'm reading through tools.deps and you're using some pretty advanced kung fu in there. I don't suppose in all your ample free time you've given any talks or write-ups on a deep dive there have you? I'm trying to write some clojurescript CLI tools for working with deps and trying to port some of the stuff. Also, I tried running with CIDER but nREPL on the deps ran into the predictable errors for including java classpaths -- I'm curious what your REPL technique is for developing tools.deps.alpha?
@goomba There are a couple of tools.deps talks, they are listed in the repo
Hmm, only the one from EuroClojure is https://www.youtube.com/watch?v=sStlTye-Kjk. But there's another one from the latest Conj.
I was there for the last one. I think I'm looking for more "how to contribute" style info
😄 reading seems like a good start
@goomba ClojureScript already has cljs.main which works great in tandem with tools.deps?
yeah of course. I'm not trying to replicate that functionality -- I'm working on something more like "pip for deps"
I'm lazy and I don't like editing my deps file by hand
also I can never remember version numbers
I've got it working for clojars but there's a bunch of stuff on git and maven and I don't know how to work with those yet
interesting, anything public yet?
not yet because it's still a mess but I'll send you some stuff on what I've got
there is a project out there that will search and add things to your deps files
Ahh that's great. Reason I'm going the cljs route is just b/c of startup time etc
and for personal education, I suppose
@goomba if startup time is important, you can also use GraalVM and/or babashka
I need to learn to use both of those, for sure
(all good options, including what you're doing now of course!)
didn't mean to derail your exercise. but you can peruse the good if you like 🙂
I'm hear here to learn in all forms!
Has GraalVM gotten to the point where we can write arbitrary CLI stuff in Clojure now?
(out of the loop)
yeah, but you can do a lot with babashka as well, without compiling.
I need to sneak that one in at work 😈
@goomba meta-example: https://github.com/borkdude/deps.clj
that is the clojure
bash script ported to both babashka and GraalVM, so you can either run it as script or binary
you can even babashka in powershell!? @borkdude your level of masochism is very impressive
yeah, Windows supported too
some heroes don't wear capes
how do you know I'm not wearing a cape? (haha, just kidding...)
well with covid I'm willing to wager most aren't even wearing pants. So I was just playing the odds
It looks like find-deps
, from a quick glance, is dealing with the same limitation I have
which is finding reagent
is easy but org.clojure/core.match
or org.clojure/core.async
is not as easy
I'm not sure how to differentiate in Maven what is Clojure and what is Java, for instance, conceptually
or... maybe it doesn't matter -- as I say it out loud. That's kind of the point of Clojure, isn't it? 😆
there are some nice todos and vision in that find-deps
lib that you could tackle
dealing with rankings and preferences if i recall correclty
The last conj talk is probably the most detailed info about the impl. What part are you having trouble with? Re repl, I just open it in Cursive as a Maven project
If you’re talking about searching/finding deps, we’ve actually done some thinking about this in tandem with add-lib and I’ve even prototyped some of it in the add-lib2 branch of tools.deps but it’s not in a usable state right now
I guess really more in the context of repl dev not updating deps.edn
But could potentially be used for either I guess
Is there a good commit on the add-lib
or add-lib2
branch that can be checked out and played around with?
I'm thinking of adding a filewatcher on deps.edn
and just automatically add any new libraries that are added there without having to restart the repl.
thanks!
hey @aviflax did you ever get a tools dep answer for tar.gz files ending up on your classpath? https://github.com/oracle/graal/issues/2481
No
I meant to ask Alex about it here… thanks for the reminder
The comment on that issue from olpaw
to the effect that the tar.gz file shouldn’t have been included in the classpath in the first place made sense to me.
So I thought maybe this might be one of those places wherein tools.deps is deviating from commonly assumed Maven behavior/convention
I don’t really know ¯\(ツ)/¯
Yeah, I bet @alexmiller knows! Here’s the dep that brings in tar.gz files: https://github.com/FundingCircle/repro-graalvm-mac-issue/blob/83abc805467808221cf48108f735527e3e3de9fa/deps.edn#L3
I guess this does not happen with leiningen, as @borkdude references it from babashka project.clj https://github.com/borkdude/babashka/blob/e667bb5d2f344fdfd12ce12639c768d80e252138/project.clj#L57
Right
As I mentioned in that graal issue, the tar.gz file comes from https://search.maven.org/artifact/org.graalvm.truffle/truffle-nfi/20.1.0/jar for org.graalvm.truffle/truffle-nfi 20.1.0:
<dependency>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-nfi-native-linux-amd64</artifactId>
<version>20.1.0</version>
<type>tar.gz</type>
</dependency>
I assume must be some use case for including such a file in a pom, although I have no idea what it is. And I assume that Maven, and whatever mechanism Leiningen uses to work with Maven, somehow filters these files out when/where they’re not needed/useful.
That’s a native dep and there is a facility in Maven to support loading those for the jvm
That Linux and amd64 there are actually parsed and used to select the right native dep for the os/arch
I think lein supports at least some of this too, but deps does not
Thanks @alexmiller!
@aviflax I have something working for my project, I’ll head over to #graalvm to followup
Great!