tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
2020-09-26T14:25:24.042300Z

@borkdude it's a minor thing but doing deps -h gives the version string twice here:

$ deps -h
Version: 1.10.1.697
Version: 1.10.1.697

...

borkdude 2020-09-26T14:27:53.042500Z

ok, going to fix now

borkdude 2020-09-26T14:44:54.042900Z

@sogaiu Fixed (and all remaining open issues as well). If there's nothing else, going to release

borkdude 2020-09-26T14:56:06.043100Z

Released: https://github.com/borkdude/deps.clj/releases/tag/v0.0.10

👍 1
practicalli-john 2020-09-26T17:50:23.045200Z

I've updated the practicalli/clojure-deps-edn GitHub project and replaced all uses of -A and -R flags for using all aliases, substituting them for -M without any issues... it actually makes things simpler 🙂 Details are in #announcements Thank you Alex (and Sean)

dominicm 2020-09-26T19:24:40.045400Z

Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
Could not locate clojure/run/exec__init.class, clojure/run/exec.clj or clojure/run/exec.cljc on classpath.

Full report at:
/tmp/clojure-16205359177864566580.edn

Presumably this means I need to correct something in the void installer, what is that?

borkdude 2020-09-26T19:25:28.045700Z

@dominicm Is this the normal clojure CLI?

dominicm 2020-09-26T19:26:24.045800Z

Ah, a new exec.jar :)

dominicm 2020-09-26T19:27:09.045900Z

OK, made that part of the new void installer :)

borkdude 2020-09-26T19:27:27.046100Z

what's a void installer?

borkdude 2020-09-26T19:27:56.046600Z

@alexmiller Feedback on error message with the new exec:

borkdude@MBP2019 ~ $ clojure -X clojure.core/prn :foo 1
{:foo 1}
borkdude@MBP2019 ~ $ clojure -X clojure.core/prn :foo
No function found on command line or in :exec-fn
I think the latter could be improved

alexmiller 2020-09-26T19:36:27.048500Z

not sure I understand why that's failing

borkdude 2020-09-26T19:36:42.048900Z

because there's no val to the key

borkdude 2020-09-26T19:36:58.049300Z

I think

alexmiller 2020-09-26T19:37:27.050Z

oh, that's probably it

alexmiller 2020-09-26T19:37:27.050100Z

it looks at whether the non-alias arg count is even or odd

alexmiller 2020-09-26T19:37:43.050600Z

there is some fiddly code there trying its best to guess what's wrong

borkdude 2020-09-26T19:38:05.050800Z

can aliases be whitespace delimited?

alexmiller 2020-09-26T19:38:15.051100Z

no

borkdude 2020-09-26T19:38:30.051400Z

then where is the ambiguity?

alexmiller 2020-09-26T19:38:53.051800Z

I don't think there is here, just saying that's the code at faultl

borkdude 2020-09-26T19:39:02.052Z

ah ok. want me to make a JIRA?

alexmiller 2020-09-26T19:39:31.052200Z

sure

alexmiller 2020-09-26T19:40:18.053500Z

there was a period of time where other variants were accepted, this might be a legacy of that, don't remember

borkdude 2020-09-26T19:40:23.053600Z

Unrelated. If checking in binaries into git wasn't an anti-pattern, I think Clojure git deps could be used to implement an ecosystem of binaries more or less like brew, but using deps.edn. The classpath can then be used as the binary path, a bit similar to a nix env. I would have a purpose for this (babashka pods). The git deps stuff could be made to work with GraalVM as well I think, so everything could be very fast after deps have been downloaded (but even without GraalVM, it's already fast due to classpath caching).

borkdude 2020-09-26T19:40:47.053800Z

Wonder what others think. Maybe instead of checking in the binaries themselves, there could be links to releases in the source, with checksums, etc. But most of the gnarly dependency stuff could be handled by tda.

🖤 1
dominicm 2020-09-26T19:43:52.053900Z

Void Linux installer :)

borkdude 2020-09-26T19:43:52.054100Z

https://clojure.atlassian.net/browse/TDEPS-168

borkdude 2020-09-26T19:49:34.055500Z

Implementing something like brew this way would only require a couple of tens of lines of code maybe.

borkdude 2020-09-26T19:58:04.056100Z

This could be a package manager for macOS, linux and Windows at the same time

borkdude 2020-09-26T20:32:54.056300Z

Aha: https://github.com/aerys/gpm - unclear how it resolves deps

vlaaad 2020-09-26T21:29:07.056700Z

btw, real world example where this might be super confusing: I tried passing var as an argument (`#'inc`), but shells treat # as a start of a comment, so...

borkdude 2020-09-26T21:33:57.057Z

Made an issue here for further discussion: https://github.com/babashka/babashka.pods/issues/19

2020-09-26T22:19:37.057500Z

i experimented with this once using git lfs.

2020-09-26T22:20:32.057700Z

the binaries in git thing and finding things under ~/.gitlibs that is

borkdude 2020-09-26T22:22:07.057900Z

ah interesting. what did come out of it?

2020-09-26T22:26:35.058100Z

well for one thing i think i learned that not everyone has git lfs 🙂

2020-09-26T22:26:47.058300Z

though it looks like typical git installs on windows get it

2020-09-26T22:27:05.058500Z

other than that it seemed to work pretty well

2020-09-26T22:28:24.058700Z

in addition to the size aspect of the repository, trying to but binaries for multiple platforms in one repository didn't feel great because the end user then gets extra cruft.

borkdude 2020-09-26T22:28:26.058900Z

Here I'm sketching out an idea: https://github.com/babashka/babashka.pods/issues/19 One option is to have a .edn file inside the git dep which refers to the download

2020-09-26T22:29:23.059300Z

yeah, i saw that page first 🙂 the .edn file inside idea seems preferable to the binaries in the repository idea

borkdude 2020-09-26T22:29:50.059600Z

yeah. also the binaries could be pulled the first time you are trying to find them

borkdude 2020-09-26T22:30:23.059800Z

this idea could even work for non-gitlibs as well

borkdude 2020-09-26T22:30:41.060Z

maybe there could be a nice coupling with github releases somehow

2020-09-26T22:30:43.060200Z

what would the ultimate location of the binaries be?

borkdude 2020-09-26T22:31:33.060400Z

the resolve function will download the link and the put them inside .foobar/your/dependency/<sha>/the-binary and then that binary file will be invoked

borkdude 2020-09-26T22:32:13.060600Z

where .foobar is some name for this package manager layered on top of tda

2020-09-26T22:36:15.060800Z

ah ok, thanks for the explanation -- i see it at the issue 🙂

alexmiller 2020-09-26T23:59:43.061200Z

Yeah, I’ll fix