This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-03
Channels
- # aleph (6)
- # announcements (4)
- # babashka (73)
- # beginners (117)
- # calva (25)
- # chlorine-clover (59)
- # cider (21)
- # clara (3)
- # cljdoc (8)
- # cljs-dev (54)
- # cljsrn (15)
- # clojure (65)
- # clojure-france (5)
- # clojure-spec (3)
- # clojure-uk (13)
- # clojurescript (79)
- # conf-proposals (1)
- # conjure (17)
- # core-logic (11)
- # datomic (21)
- # fulcro (82)
- # graalvm (11)
- # helix (7)
- # jobs-discuss (11)
- # joker (2)
- # juxt (3)
- # local-first-clojure (1)
- # luminus (5)
- # nrepl (61)
- # off-topic (12)
- # pathom (70)
- # re-frame (3)
- # reitit (3)
- # rum (1)
- # shadow-cljs (58)
- # sql (1)
- # tools-deps (26)
- # xtdb (3)
Hello! I've got an idea for my own extension to tools.deps.alpha, I can see bunch of them in the src/main/clojure/clojure/tools/deps/alpha/extensions/
path. So let's say I now have my X extension written, how can I make tools.deps.alpha use it? I guess I want to end up with something similar to a lein plugin where installing it gives you the ability of using the new extension. I'm not super familiar with Java (mostly been dealing with ClojureScript) so don't expect anyone to give me the straight path to my solution, but some pointers/keywords for what to lookup would be most appreciated!
I see. Thanks! So for now, if I'd like to publish it to enable others to use it, I would have to publish a forked version of tools.deps.alpha with my extension worked into the codebase?
Hm, but if this is not exposed to do in the cli, it feels like a workaround at best, only for people who are using deps as a library. Not sure how the common use case looks for using deps (as I'm still mostly using leiningen), but feels like most people would still stick to using the cli. But again, I don't know enough about this to say for sure
What’s your extension?
@U064X3EF3 fetching dependencies via a content-addressed database (IPFS or similar) and splitting versions into two different versions, one for the interface and one for the implementation
Including an extension would just require changing the one line in the clojure script that defined the tools classpath
Well, I guess the extension also needs to be loaded
clj has been out for 2 or 3 years and this is the first time someone has asked about this so it hasn’t really been a priority
yeah, if I'll fork tools.deps I can see the path forward easily, but for obvious reasons I wanted to avoid that. Makes sense that no one asked, as it's a bit bleeding-edge stuff to load dependencies from something that is not HTTP/S Thanks Alex!
I think it gets more complex if you want to support dependencies which depend on an extension.
Hm, yeah, might have to have some sort of bootstrapping available or ship whatever the extension comes with over clojars/maven. Unless I just end up with a external babashka cli util that does the fetching... Not sure yet, exploring the options
There isn’t anything to clean
Force will force a recompute of the cached classpath which is needed in a few special cases but rare
In lein, there is a build directory with artifacts, but that’s not a thing in clj (YET!)
Does that mean it will be a thing in clj, or that it will be a thing in a tools.build main?
I hope tools.build will have some sha hashes or something for its inputs/outputs caching so it won't require cleaning...
Not going to get into any details now, sorry :)