Fork me on GitHub
#babashka
<
2023-01-25
>
borkdude10:01:25

Introducing clj-kondo-bb: invoke clj-kondo from babashka scripts (or as a babashka one liner)! clj-kondo babashka https://github.com/clj-kondo/clj-kondo-bb

Michael W10:01:05

G'morning. I tried to upgrade babashka today under Linux Mint using home brew and am getting this error: λ brew install borkdude/brew/babashka ==> Fetching borkdude/brew/babashka ==> Downloading https://github.com/babashka/babashka/releases/download/v1.1.172/babashka-1.1.172-linux-amd64-static.tar. Already downloaded: /home/mwhitford/.cache/Homebrew/downloads/800026d2732abfccd61a43d0fd5ec692297c5454002f9d92af6a1b781a3caf75--babashka-1.1.172-linux-amd64-static.tar.gz ==> Installing babashka from borkdude/brew Error: An exception occurred within a child process: NoMethodError: undefined method `version_suffix' for #<Formulary::FormulaNamespaceAPIe0d511356bd44120af49cc96c9dcf3b3::Gcc:0x0000000005657278> Did you mean? version_scheme

borkdude10:01:30

What was your previous bb version?

borkdude10:01:49

And what is your brew version

Michael W10:01:11

==> Upgrading borkdude/brew/babashka 1.0.169 -> 1.1.172

Michael W10:01:25

λ brew --version Homebrew 3.6.20-72-g8f41918 Homebrew/homebrew-core (git revision f8ba616a4ef; last commit 2023-01-25)

Michael W10:01:53

Once the upgrade failed I removed babashka and tried to install from scratch, but same issue with the same error

borkdude10:01:20

Maybe try remove and then install?

borkdude10:01:28

And maybe --force

Michael W10:01:41

I did the remove and install part, will try force

Michael W10:01:16

λ brew install borkdude/brew/babashka --force ==> Fetching borkdude/brew/babashka ==> Downloading https://github.com/babashka/babashka/releases/download/v1.1.172/babashka-1.1.172-linux-amd64-static.tar. Already downloaded: /home/mwhitford/.cache/Homebrew/downloads/800026d2732abfccd61a43d0fd5ec692297c5454002f9d92af6a1b781a3caf75--babashka-1.1.172-linux-amd64-static.tar.gz ==> Installing babashka from borkdude/brew Error: An exception occurred within a child process: NoMethodError: undefined method `version_suffix' for #<Formulary::FormulaNamespaceAPIe0d511356bd44120af49cc96c9dcf3b3::Gcc:0x000000000686bb30> Did you mean? version_scheme

Michael W10:01:27

Same error on undefined method.

borkdude10:01:31

I did the standard update procedure, no difference for 169 and later versions

Michael W10:01:15

I'm on Linux not mac, but I'm not an expert on brew.

Michael W10:01:39

Never seen this before, and clj-kondo also giving the same error, tried remove and install, same thing.

borkdude10:01:13

I'll try on my own VPS

Michael W10:01:08

λ brew install clj-kondo ==> Fetching borkdude/brew/clj-kondo ==> Downloading https://github.com/borkdude/clj-kondo/releases/download/v2023.01.20/clj-kondo-2023.01.20-linux-static-am Already downloaded: /home/mwhitford/.cache/Homebrew/downloads/15b1e47068e32b04ec81c25568e3b249bfcf8879660c49e91d5cf954586158cb--clj-kondo-2023.01.20-linux-static-amd64.zip ==> Installing clj-kondo from borkdude/brew Error: An exception occurred within a child process: NoMethodError: undefined method `version_suffix' for #<Formulary::FormulaNamespaceAPIe0d511356bd44120af49cc96c9dcf3b3::Gcc:0x0000000006b59db0> Did you mean? version_scheme

Michael W10:01:14

I'll boot my mac and try the upgrade there.

borkdude10:01:12

What does ruby -v give you

Michael W10:01:52

λ ruby -v ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]

Michael W10:01:20

Also exact same upgrade of babashka 1.0.169 ==> 1.1.172 on my mac just went with no issues.

Michael W10:01:44

I usually brew update && brew upgrade both linux and mac brew the same day/time.

borkdude10:01:12

I'm upgrading on my VPS now, seems to work

borkdude10:01:27

==> Upgrading borkdude/brew/babashka
  0.7.0 -> 1.1.172
;)

Michael W10:01:07

Ok so my brew is broken somehow. Thanks for looking.

borkdude10:01:00

I don't know why brew things that gcc etc are a dependency of babashka. They aren't, but whatever.

==> Installing dependencies for borkdude/brew/babashka: [email protected], glibc, mpfr, libmpc, xz, zlib, binutils and gcc

Michael W10:01:12

Just weird it's clj-kondo and babashka but the other pending upgrades all went with no issues.

borkdude10:01:32

VPS worked great:

$ bb --version
babashka v1.1.172

Michael W11:01:04

downloading the binary manually from github and placing on the path works just fine, guess I'll write up a little script to do upgrades for babashka/clj-kondo that way until my brew fixes itself in a later version or something.

borkdude11:01:36

bash <(curl ) 

Michael W11:01:40

Thanks again for taking the time to look.

borkdude11:01:02

clj-kondo has a similar script, see README

Michael W11:01:04

Nice thanks for the link to the script.

Michael W11:01:41

λ brew tap babashka/brew borkdude/brew

Michael W11:01:56

Hmmm, two taps, gonna try to untap and tap again.

Michael W11:01:48

No same issue, going with the script, really thanks again for taking the time.

Michael W18:01:40

Just to update this, I did not make any changes on my side, but a brew update && brew install borkdude/brew/babashka worked fine today. So whatever was causing this issue for me has resolved.

👍 2
shem12:01:06

it seems some recent version dropped the implicit print? i have some scripts that just return a value when exiting. the value used to be printed, now the scripts don't output anything unless i add a println or equivalent.

shem12:01:04

right, didn't catch that. thanks

borkdude12:01:30

You can add the --prn flag to get back the old behavior

borkdude12:01:14

Note to self: don't use .bb in library or repository name endings. Mentioning them here, Twitter and Mastodon will turn those names in URLs. I just renamed to clj-kondo-bband will do the same for

otfrom13:01:40

interesting that your client turns them into urls. I only get clickable links if I put http(s):// on the front

otfrom14:01:51

oh, on slack yeah, it is a clickable link. I should definitely register http://otfrom.bb tho

Frank Henard21:01:05

A bit of a babashka newbie here. I'm getting Unable to resolve classname: java.lang.ref.SoftReference when trying to use clojure.core.memoize. Full stacktrace in thread

Frank Henard21:01:03

here's my bb.edn

{
 :paths ["src/bb"]
 :deps {org.clojure/core.memoize {:mvn/version "1.0.257"}}
 }

Frank Henard21:01:36

the error happens when I compile my namespace in cider

borkdude21:01:49

The class can be added but this library is likely not compatible with babashka for other reasons. However, this library is used in a lot of other libs so maybe it makes sense to include it in bb

Frank Henard21:01:47

I see, thanks @U04V15CAJ. My google search came up with this tweet https://twitter.com/borkdude/status/1251820200934154240 which made me think it was included at one point.

borkdude21:01:49

what does clojure.data.xml have to do with core.memoize?

Frank Henard21:01:19

I was just trying to use the ttl function

borkdude21:01:23

yeah, I see

borkdude21:01:15

Let's at least make an issue to track if there's more interest in having core.cache / memoize in bb I made two discussion here: https://github.com/babashka/babashka/discussions?discussions_q=label%3Alibraries Please upvote and/or explain your use case over there