Fork me on GitHub
#tools-deps
<
2020-09-26
>
sogaiu14:09:24

@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

...

borkdude14:09:53

ok, going to fix now

borkdude14:09:54

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

practicalli_john17:09:23

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)

dominicm19:09:40

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?

borkdude19:09:28

@dominicm Is this the normal clojure CLI?

dominicm19:09:24

Ah, a new exec.jar :)

dominicm19:09:09

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

borkdude19:09:27

what's a void installer?

dominicm19:09:52

Void Linux installer :)

borkdude19:09:56

@alexmiller Feedback on error message with the new exec:

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

alexmiller19:09:27

not sure I understand why that's failing

borkdude19:09:42

because there's no val to the key

alexmiller19:09:27

oh, that's probably it

alexmiller19:09:27

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

alexmiller19:09:43

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

borkdude19:09:05

can aliases be whitespace delimited?

borkdude19:09:30

then where is the ambiguity?

alexmiller19:09:53

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

borkdude19:09:02

ah ok. want me to make a JIRA?

vlaaad21:09:07

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...

alexmiller23:09:43

Yeah, I’ll fix

alexmiller19:09:18

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

borkdude19:09:23

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).

sogaiu22:09:37

i experimented with this once using git lfs.

sogaiu22:09:32

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

borkdude22:09:07

ah interesting. what did come out of it?

sogaiu22:09:35

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

sogaiu22:09:47

though it looks like typical git installs on windows get it

sogaiu22:09:05

other than that it seemed to work pretty well

sogaiu22:09:24

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.

borkdude22:09:26

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

sogaiu22:09:23

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

borkdude22:09:50

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

borkdude22:09:23

this idea could even work for non-gitlibs as well

borkdude22:09:41

maybe there could be a nice coupling with github releases somehow

sogaiu22:09:43

what would the ultimate location of the binaries be?

borkdude22:09:33

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

borkdude22:09:13

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

sogaiu22:09:15

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

borkdude19:09:47

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
borkdude19:09:34

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

borkdude19:09:04

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

borkdude20:09:54

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