Fork me on GitHub
#babashka
<
2023-04-21
>
borkdude11:04:34

I'm considering the following change to bb:

~/my_project/bb.edn <- has medley in :deps 
~/my_project/script.bb <- uses medley.core, has #!/usr/bin/env bb shebang
/tmp $ ;; not inside ~/my_project
/tmp $ export PATH=$PATH:~/my_project
/tmp $  ;; works, uses ~/my_project/bb.edn as the "config" file
This lets you more easily create system-wide scripts, without using bbin

๐Ÿ’ฏ 8
joakimen12:04:55

Digging this change:slightly_smiling_face:

borkdude12:04:29

Released now in 1.3.177. I had it planned for a while, I hope it pans out the right way

joakimen12:04:20

Yeah already tested, and works as expected here. Fingers crossed for no surprises:crossed_fingers:

pesterhazy10:04:55

Just tried this - it's a feature I didn't know I wanted, until now! ๐Ÿ™‚

pesterhazy10:04:37

How should this work when combined with relative paths in bb.edn?

pesterhazy10:04:44

We have this:

:deps {pitch/bblib {:local/root "../../projects/bblib"}}

pesterhazy10:04:42

but it looks like bb is using cwd rather (dirname "bb.edn") as a base path to resolve relative paths

borkdude10:04:09

@U06F82LES Hmm, somehow I missed your messages

borkdude10:04:38

That looks like a bug

๐Ÿ‘ 2
borkdude10:04:48

which I know a fix for

borkdude10:04:59

let me write an issue + patch later this week

borkdude10:04:04

@U06F82LES fixed on master now

๐Ÿงก 2
lread13:04:53

Not sure, I might have found an issue with 1.3.177 ๐Ÿงต

โœ… 2
lread13:04:28

The suspense is building!

lread13:04:51

Given a bb.edn in my project root, if I try to invoke a bb ./script/iluvbb.clj and that script refers to a dep in bb.edn I am getting a failure.

lread13:04:06

Small repro coming shortly...

borkdude13:04:27

hmm, and there is no bb.edn in script?

borkdude13:04:42

that's a bug for sure, I'll fix it ASAP

lread13:04:24

I'll still do a small repro to verify my claim here. Sometimes I'm out to lunch, ya know?

borkdude13:04:09

I see the error already

lread13:04:27

Ah, good, no need for repro?

borkdude13:04:22

nope

๐Ÿ‘ 2
borkdude13:04:28

New version releasing now...

๐ŸŽ๏ธ 12
lread13:04:32

It took me longer to report the issue than for you to fix it!

borkdude 18
borkdude14:04:14

plz test...

borkdude14:04:24

Also pushed a test now to master

borkdude17:04:16

@UE21H2HHD I hope the defunct bb didn't break your internet connection ๐Ÿ˜จ

lread17:04:50

Sorry @U04V15CAJ, I was busy helping my Dad do his taxes! Will try now.

borkdude17:04:10

Ah, dad taxes go first, I totally get that :)

simple_smile 2
lread17:04:56

Looks good! Tx!