bbin icon indicating copy to clipboard operation
bbin copied to clipboard

Does bbin support installing multiple libraries from `bb.edn`?

Open teodorlu opened this issue 2 years ago • 3 comments

Since :bbin/bin is a map, I assumed installing multiple binaries was okay:

{:deps {io.github.teodorlu/shed {:local/root "."}}
 :bbin/bin {update-repos {:main-opts ["-m" "teodorlu.shed.update-repos/-main"]}
            browsetxt {:main-opts ["-m" "teodorlu.shed.browsetxt/-main"]}}}

(source)

But this seems to only install update-repos. Originally asked on Slack.


Should bbin be able to install multiple binaries, and not just one?

teodorlu avatar Mar 08 '23 15:03 teodorlu

I think this could be improved. PR welcome if @rads agrees.

borkdude avatar Mar 08 '23 15:03 borkdude

The first key-value pair is picked in a (some-> bin-config first key str) here. Looks like the rest of the install-deps-git-or-local function assumes that script-name is one script and not multiple scripts.

https://github.com/teodorlu/bbin/blob/6b778266a490a4d0d89618a60bffc9617f62e7e3/src/babashka/bbin/scripts.clj#L413-L417

teodorlu avatar Mar 08 '23 15:03 teodorlu

Yep, the map is intentional to support multiple scripts, though I haven't gotten around to implementing that quite yet. See also:

  • https://github.com/babashka/bbin/issues/18

rads avatar Mar 09 '23 02:03 rads