Fork me on GitHub
#cursive
<
2021-09-17
>
stijn10:09:11

Hello, is there some documentation of the new babashka integration available? i'm struggling to 1. setup the REPL (you can choose a module, but I don't know how to add it to Cursive - I currently only have a bb.edn, not deps.edn) 2. have Cursive recognize the source files that are declared in bb.edn :paths

cfleming10:09:54

I actually have the doc ready to go for a planned release tomorrow. Hang on and I’ll get it into the staging env so you can check it out.

‼️ 4
excited 2
cfleming10:09:25

Here you go, let me know if anything is confusing: https://staging.cursive-ide.com/userguide/eap/babashka.html

2
stijn13:09:25

OK, the docs are clear, but it's not working out for me. I don't see the babashka module in this screen

cfleming20:09:37

Hmm, which version of Cursive are you running?

cfleming21:09:02

Also, just to check - you have selected the module you want to add support to, right?

stijn07:09:10

Cursive version is

stijn07:09:48

Yes, I selected the module. Just to be sure, does Cursive expect to have any specific files in the module before it sees it as a 'babashka' module?

stijn07:09:37

I'm using bb.edn, I understand it doesn't support the deps (not using that), but I am using the :paths entry for putting code in "src"

cfleming08:09:06

One question - how did you create the module you’re trying to add this to? It has to be a Java module type, which most Clojure modules are. Did you create this via deps or lein, or in some other way?

stijn10:09:02

ah, no I just added the directory, because I don't have a deps.edn or lein file

stijn10:09:11

but I can add an empty one maybe?

cfleming10:09:40

Yeah, if you just add a deps.edn containing {}, right click it and “Add as Clojure Deps file” that should do it.

stijn10:09:36

ok yes that worked, thanks!

cfleming10:09:53

Great! I’ll add that to the doc, I’d assumed that everyone would be adding bb stuff to an existing module rather than creating a new one.

stijn10:09:45

Really nice work!

borkdude10:09:14

@stijn Cursive should be executing bb print-deps which prints a deps.edn which is then used to resolved local sources + dependencies

borkdude10:09:51

so it's using bb itself under the hood to detect the project deps

stijn10:09:14

ok, but I'm clearly missing something; when does it do this? when you run the REPL?

stijn10:09:40

The thing I'm stuck at is that I need to specify a module, but I don't know how to add the bb project as a module.