Fork me on GitHub
#babashka
<
2021-10-08
>
NoahTheDuke13:10:35

love that you removed “Performance” from Non-Goals

👍 2
dabrazhe09:10:44

Yes, is performance now something we can count on : ) ?

borkdude09:10:14

Performance of SCI will never be as good as compiled Clojure, but SCI tries to be as fast as possible within its constraints

littleli15:10:33

Unlock the multicore powers of babashka! ❤️

Michael W16:10:58

Is there an example of how to use java-http-clj?

borkdude16:10:21

The README of java-http-clj :)

borkdude16:10:26

Just add {:deps {java-http-clj/java-http-clj {:mvn/version "0.4.3"}} to bb.edn and you should be able to use it

Michael W16:10:57

Ah that was the thing I was missing, thanks.

borkdude16:10:10

Yeah, it's not a built-in library at this point

Michael W16:10:13

Is there a user level bb.edn?

borkdude16:10:19

no there isn't

Michael W16:10:41

I love bb, it's awesome to be able to run clojure from anywhere.

❤️ 5
Dimitar Uzunov16:10:55

hey guys, I have an interesting issue when using the clojure function from the tasks api - (clojure “-P”) as example. It just hangs in the CI/CD agent, can’t replicate it on my machine. I can work around it but its still pretty interesting, I wonder what I can do to troubleshoot it?

borkdude16:10:30

Obvious question, but just checking: Does your machine have internet access?

borkdude16:10:49

Any special rules around internet traffic?

Dimitar Uzunov16:10:09

its probably something in that environment, just idk how to know for sure what it is

Dimitar Uzunov16:10:03

would a thread dump be useful?

borkdude16:10:20

On the first invocation bb tries to download a jar file so it can invoke tools deps

borkdude16:10:59

That might be the issue: if you are blocking this traffic and keeping the connection active or so

Dimitar Uzunov16:10:16

oh, well bb works in general very well, just when I try that function from the tasks api

Dimitar Uzunov16:10:00

sorry, I explained really badly

Dimitar Uzunov16:10:09

hmm maybe it can’t write to the location it should download?

borkdude16:10:24

No worries. If you look at the deps.clj repository you can see what it tries to download and also how to override that if you already downloaded the jar. Yes that is also possible

Dimitar Uzunov16:10:48

cool! babashka.impl.deps right? I will check it out - thanks!

Dimitar Uzunov16:10:55

oh yeah the jar is downloaded, will dig around more

borkdude16:10:06

You also need to have java installed

Dimitar Uzunov16:10:32

yep its in there

Dimitar Uzunov16:10:15

I’m migrating a bash shell script to bb

Dimitar Uzunov16:10:26

so the expected clojure stuff works in there

borkdude16:10:15

Which version of bb?

Dimitar Uzunov16:10:14

I think its an issue with deps.clj because I installed in there

Dimitar Uzunov16:10:25

and get the same behaviour

Dimitar Uzunov16:10:09

cool, I will try some more and will write here if I find anything 🙂

Dimitar Uzunov16:10:14

have an awesome weekend!

borkdude16:10:18

can you try with bb 0.6.2?

borkdude16:10:34

I would be surprised if that made a difference but worth a try

Dimitar Uzunov16:10:46

sure, will give that a try too

borkdude16:10:07

and you could not reproduce this locally right?

Dimitar Uzunov16:10:38

yeah, just under some particular CI circumstances

Dimitar Uzunov16:10:49

so its something env specific for sure

borkdude16:10:58

you can also execute bb clojure -P

borkdude16:10:04

this is the same as deps.clj basically

Dimitar Uzunov16:10:21

yeah tried that, same

Dimitar Uzunov16:10:47

that’s why I’m convinced its something that prevents deps.clj from working

borkdude16:10:19

if you clone deps.clj there locally and insert println you might be able to find something perhaps

borkdude16:10:50

you can even download the deps.clj script from the root of that repo and execute it with bb

borkdude16:10:56

and then make changes

borkdude17:10:08

/tmp $ curl -sLO 
$ bb deps.clj
Cloning: 
Checking out:  at 7501b461fde07ff8b91707d27fc10e3f4403a5fa

👍 1
borkdude17:10:20

so you can edit that deps.clj script and insert some printlns

👍 1
Dimitar Uzunov17:10:54

found the issue… a repo in ~/.clojure/deps.edn that doesn’t exist caused this

Dimitar Uzunov17:10:07

thanks for helping 🙂

borkdude17:10:13

Is there anything that should be fixed on deps.clj’s end?

Dimitar Uzunov17:10:14

hmmm not sure, it has different behaviour from the bash-clj, neither complain about a repo not existing

Dimitar Uzunov17:10:56

it could just be documented thats probably enough

borkdude18:10:58

@ULE3UT8Q5 is it possible for you to make a Dockerfile which shows this problem? or point me to where things didn't work like expected?

👍 1
borkdude18:10:10

I think this needs to be solved if the bash-clj does work

borkdude18:10:23

if I move ~/.clojure aside then bb clojure -P still works for me

Dimitar Uzunov20:10:10

okay I will give it a try