babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
rwstauner 2021-07-04T17:55:36.334200Z

i updated that wiki page about bash equivalents to differentiate among $BASH, $0, and $BASH_SOURCE

đź‘Ť 1
cfleming 2021-07-04T22:54:07.334900Z

Does anyone ever require multiple bb versions on a particular machine, or is that just not something that’s ever required in practice?

borkdude 2021-07-05T08:05:30.336100Z

For me personally, I usually use one version (unless I'm testing something against the previous version)

cfleming 2021-07-05T10:31:17.336300Z

Thanks, just thinking about how the bb config should work in Cursive.

đź‘Ť 1
onetom 2021-07-05T16:43:57.345200Z

We are pinning the versions of most of our dependencies with Nix, so babashka might have a slightly different version in every project directory. At least that's the case with Clojure CLI versions, so it's not great that I have to pick - manually - one of those versions and use it for all projects within IntelliJ... We only had minor issues though, maybe twice over the last 1.5year, because of this manual version specification.

cfleming 2021-07-05T21:14:45.347100Z

Hmm, that makes things much more complicated. I was hoping to avoid that - it dramatically complicates the dependency download and management. I think I’ll start with a single project-wide version for now, and if that is problematic then I’ll reconsider it.

borkdude 2021-07-05T21:16:53.347300Z

@cfleming I think it's quite safe to assume "newest" for var resolving as breakage should be rare

cfleming 2021-07-05T21:36:04.347500Z

Well, it’ll be “currently installed” rather than “newest”, but that’s good to know about the breakage.

cfleming 2021-07-05T21:38:54.347700Z

I managed to get the deps download working BTW, getting the deps file from github as we discussed, and downloading using tools.deps. The only problem I have with that is that the LSP script fixes the versions of bb/fs and bb/curl, which are local in the deps file. Is there any good way to find out which versions of those I should use with which version of bb?

borkdude 2021-07-05T21:49:57.351700Z

@cfleming those libraries are submodules of babashka, rather than part of the deps.edn / project.clj

borkdude 2021-07-05T21:50:21.351900Z

a safe assumption is that bb latest always has the latest release of those libs

borkdude 2021-07-05T21:58:49.357900Z

I can put some more work to make this easier perhaps

cfleming 2021-07-06T00:24:00.358100Z

@borkdude Yes, but I can’t get those versions from the deps.edn file downloaded from github. The LSP script here hardcodes them: https://github.com/babashka/babashka/issues/733#issue-811939787

cfleming 2021-07-06T00:25:44.358300Z

I can’t see any easy way to derive those versions.

cfleming 2021-07-06T00:29:25.358500Z

For reference, what I’m doing now is: 1. The user configures the path to a bb command. 2. I invoke bb -version and parse the result to get the version string. 3. I download <https://raw.githubusercontent.com/babashka/babashka/v$version/deps.edn>, clean it up in a similar way to your LSP script and manually introduce those versions.

cfleming 2021-07-06T00:31:59.358700Z

Unfortunately Github isn’t smart enough to let me use <https://github.com/babashka/babashka/tree/v0.4.3/babashka.nrepl>.