Fork me on GitHub
#babashka
<
2020-12-16
>
Jakub Holý (HolyJak)12:12:32

@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!

borkdude12:12:54

@holyjak sorry about that, changed it

❤️ 3
borkdude12:12:12

deps.clj currently depends on the newest. you will see this with -Sdescribe

borkdude12:12:06

@holyjak Note that deps.clj comes bundled with babashka since the latest release (0.2.5 released a few days ago)

👍 6
Jakub Holý (HolyJak)12:12:46

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

borkdude12:12:23

they don't allow you to set -o pipefail?

Jakub Holý (HolyJak)12:12:04

So it seems. I am running via sh ... perhaps that is the cause ...

borkdude12:12:25

because you have no bash?

👀 3
Jakub Holý (HolyJak)12:12:25

no, sorry, I can use bash. My bad!

helios13:12:29

I feel i already asked, but is there already some documentation in shipping a self-contained binary? (i.e. BB + my script)

borkdude13:12:49

@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

Eugen22:12:21

I hope it helps

borkdude13:12:25

uberscript + uberjar are two ways of packaging a multi-file project into one thing

borkdude13:12:41

uberjar should be used if you also want to package non-source files

helios13:12:24

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.

borkdude13:12:36

installing bb + delivering the uberjar is probably the most cross platform/portable way

borkdude13:12:16

bb is already multi-platform. if you would support multiple platforms yourself you would have to compile for each OS again

borkdude13:12:56

you could give them a zip files with bb included and then use a local shebang possibly too

borkdude13:12:06

or have a small bash script download the bb

borkdude13:12:37

but maybe docker will work too

bhurlow20:12:23

The newer error breakdown where it shows locals is soooo great

❤️ 3
bhurlow20:12:09

it would seem possible to make an interactive debugger for babashka if those locals are accessible somewhere

borkdude20:12:58

(require '[babashka.deps :as deps])

(deps/add-deps
 '{:deps
   {limit-break
    {:git/url ""
     :sha "050fcfa0ea29fe3340927533a6fa6fffe23bfc2f" :deps/manifest :deps}}})

(require '[limit.break :as lb])

(let [x 1]
  (lb/break))

borkdude20:12:10

$ 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

borkdude20:12:41

break> (lb/local-bindings)
{locals {x 1}, form (lb/local-bindings), nil nil, x 1}

borkdude20:12:02

(not sure what the nil nil is...)

borkdude20:12:07

and this works in Clojure itself too

bhurlow20:12:19

will have to see how

borkdude20:12:39

(which it was originally written for, this is a 9 year old library which happens to work well with bb)

💯 6
bhurlow20:12:48

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

bhurlow20:12:17

by Phil Hagelberg tho 🙂