@borkdude Hi! Shouldn't https://github.com/borkdude/deps.clj/blob/master/resources/DEPS_CLJ_RELEASED_VERSION be changed to 0.0.11 since there is a release for that version?
Also, which version of #tools-deps does which version of deps.clj correspond to? (I am trying to track down a problem with :extra-deps
). Thank you!
@holyjak sorry about that, changed it
deps.clj currently depends on the newest. you will see this with -Sdescribe
thank you!
@holyjak Note that deps.clj comes bundled with babashka since the latest release (0.2.5 released a few days ago)
hm, the 0.0.10 install script https://raw.githubusercontent.com/borkdude/deps.clj/master/install is failing for me on AWS linux: > 3: set: Illegal option -o pipefail
they don't allow you to set -o pipefail?
So it seems. I am running via sh ...
perhaps that is the cause ...
because you have no bash?
no, sorry, I can use bash. My bad!
I feel i already asked, but is there already some documentation in shipping a self-contained binary? (i.e. BB + my script)
@helios this came up recently. https://clojurians.slack.com/archives/CLX41ASCS/p1608045575304800 tl;dr: no, bb doesn't support this because I don't know how you can package bb + script into one thing. some options: - bb + uberscript - bb + uberjar - docker image
@helios I saw this technique with games installers on linux: https://stackoverflow.com/questions/955460/how-do-linux-binary-installers-bin-sh-work And alos https://makeself.io/ (from the link)
I hope it helps
thanks!
uberscript + uberjar are two ways of packaging a multi-file project into one thing
uberjar should be used if you also want to package non-source files
I see, thanks! Asking because for our on-prem process we give our customers setup scripts for the infrastructure (a single bb "project" if you will) but it'd be simpler to release binaries.
installing bb + delivering the uberjar is probably the most cross platform/portable way
bb is already multi-platform. if you would support multiple platforms yourself you would have to compile for each OS again
you could give them a zip files with bb included and then use a local shebang possibly too
or have a small bash script download the bb
but maybe docker will work too
The newer error breakdown where it shows locals is soooo great
it would seem possible to make an interactive debugger for babashka if those locals are accessible somewhere
@bhurlow using this lib you kind of get that as well: https://github.com/borkdude/babashka/blob/master/doc/projects.md#limit-break
(require '[babashka.deps :as deps])
(deps/add-deps
'{:deps
{limit-break
{:git/url "<https://github.com/technomancy/limit-break>"
:sha "050fcfa0ea29fe3340927533a6fa6fffe23bfc2f" :deps/manifest :deps}}})
(require '[limit.break :as lb])
(let [x 1]
(lb/break))
$ bb /tmp/foo.clj
Babashka v0.2.5-SNAPSHOT REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.
break> x
1
break> (lb/local-bindings)
{locals {x 1}, form (lb/local-bindings), nil nil, x 1}
(not sure what the nil nil is...)
very nice
and this works in Clojure itself too
oh really
will have to see how
(which it was originally written for, this is a 9 year old library which happens to work well with bb)
other debugger attempts in clojure do a very deep macro transform to instrument the forms, wondering if SCI and being interpreted in general might give more control
by Phil Hagelberg tho 🙂