i updated that wiki page about bash equivalents to differentiate among $BASH
, $0
, and $BASH_SOURCE
Does anyone ever require multiple bb versions on a particular machine, or is that just not something that’s ever required in practice?
For me personally, I usually use one version (unless I'm testing something against the previous version)
Thanks, just thinking about how the bb config should work in Cursive.
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.
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.
@cfleming I think it's quite safe to assume "newest" for var resolving as breakage should be rare
Well, it’ll be “currently installed” rather than “newest”, but that’s good to know about the breakage.
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?
@cfleming those libraries are submodules of babashka, rather than part of the deps.edn / project.clj
a safe assumption is that bb latest always has the latest release of those libs
I can put some more work to make this easier perhaps
@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
I can’t see any easy way to derive those versions.
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.
Unfortunately Github isn’t smart enough to let me use <https://github.com/babashka/babashka/tree/v0.4.3/babashka.nrepl>
.