This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-17
Channels
- # announcements (4)
- # babashka (22)
- # beginners (50)
- # biff (2)
- # calva (4)
- # cider (18)
- # clj-kondo (12)
- # cljs-dev (3)
- # clojars (2)
- # clojure (66)
- # clojure-austin (1)
- # clojure-belgium (11)
- # clojure-europe (90)
- # clojure-hungary (5)
- # clojure-norway (6)
- # clojure-switzerland (1)
- # clojure-uk (4)
- # clojurescript (19)
- # datascript (2)
- # datomic (41)
- # fulcro (4)
- # gratitude (2)
- # helix (20)
- # jackdaw (2)
- # jobs (9)
- # jobs-discuss (38)
- # kaocha (1)
- # minecraft (8)
- # off-topic (11)
- # polylith (21)
- # rdf (2)
- # remote-jobs (1)
- # sci (1)
- # shadow-cljs (12)
- # specter (7)
- # tools-deps (16)
yeah, I wasn't aware there were any so didn't occur to me
I'm trying to expose something as a clj tool, but I don't see why this is failing:
$ clojure -Ttools install io.github.borkdude/jet '{:git/sha "18bfbda4237f295877addafe87e5a5eb8e1b0698"}' :as jet
Execution error (NullPointerException) at clojure.tools.deps.alpha.util.dir/canonicalize (dir.clj:30).
null
I got
% clojure -Ttools install io.github.borkdude/jet '{:git/sha "18bfbda4237f295877addafe87e5a5eb8e1b0698"}' :as jet
Cloning:
Execution error (ExceptionInfo) at clojure.tools.deps.alpha.extensions.git/eval1445$fn (git.clj:113).
Commit not found for io.github.borkdude/jet in repo at 18bfbda4237f295877addafe87e5a5eb8e1b0698
not sure what version of clojure
you're using, it has changed several times in this area lately
but indeed, I don't see that as a valid commit sha
% clojure -Ttools install-latest :lib io.github.borkdude/jet :as jet
Checking out: at 73e0be021a290a95bf1d671102be1b4b25c2b5a4
Installed tool jet as: io.github.borkdude/jet {:git/tag "v0.2.18", :git/sha "73e0be0"}
using the new install-latest ...
Cool. But that one didn't have the exec function yet, just added it :) Is there also a way to invoke a tool with a default function, so you don't have to write:
clj -Tjet exec ...
This is why I use an alias rather than the tool name. With an alias you can specify the function to call
no, we're kind of on the fence about making that optional, so it's required right now
Can you also install a mvn dep as a tool? I guess not right, since it won't have the :ns-default info available?
Anyway, #jet is now available for deps.edn too: https://github.com/borkdude/jet#depsedn I was able to support both -M and -X/-T style invocations with minimal boilerplate thanks to #babashka-cli :-D
right, you can install, but you can't publish the usage stuff. I'm not sure yet what a good way to do that is, whether it should be something you added to pom or put it in a resource in the jar etc. just needs a bit more thought
Presumably, there's a potential parsing conflict if the exec function is omitted (made a default)? clojure -Tthing what are '{these args?}'
vs clojure -Tthing func what '[are these args?]'
since you can't really assume anything based on the number of arguments?
yes, that's part of it