Fork me on GitHub
#calva
<
2021-09-01
>
Jakub Holý06:09:41

Hi @pez! I am fixing fulcro-exercises (https://github.com/fulcro-community/fulcro-exercises/tree/switch2npx#part-1-the-exercises) for Calva based on your info. Instead of your PR (thx for it!) I decided to simplify and use npx ... instead of clojure -M:... But I do not get how to use that best with Calva's Jack-in. Does calva run shadow-cljs watch <build>? It does not seems so. But if I run it manually from terminal then there is no point for Calva to start a repl b/c watch already did it??? 🙏

2
pez06:09:29

This will depend on who is the target audience for the repo. A lot of Calva users will try to use Calva Jack-in and if that doesn’t work, probably struggle a little bit and then give up. You can probably mitigate this a bit by clearly documenting how the project REPL is supposed to be started.

pez06:09:39

The way Calva jack-in starts the repl is to issue:

npx shadow-cljs -d cider/cider-nrepl:0.26.0 watch :main :workspaces
(The actual builds watched will depend on what the user uses in the start builds quick-pick menu.)

pez06:09:20

Jack-in is mainly a way to help you start the REPL in a way that satisfies Calva’s dependencies (and thus allow the project files to not bother with what Calva currently needs).

pez06:09:27

Not sure if I am answering your questions. 😃

Jakub Holý07:09:51

No 🙂 The question is, how do I have to change https://github.com/fulcro-community/fulcro-exercises/tree/switch2npx so that Calva jack in works. currently when I try it as described at at first NOTE: under https://github.com/fulcro-community/fulcro-exercises/tree/switch2npx#part-1-the-exercises, it finally fails with > Failed starting cljs repl for build: :main. Is the build running and connected? and there seems nothing running at localhost:8000 I.e. it seems that watch has not really been started.

pez07:09:48

Try with the shadow-cljs project type.

pez07:09:41

I’m in gather town ready to screen share with you, maybe we can get this going easier that way.

Jakub Holý08:09:07

awesome, thank you! How do I connect?

Jakub Holý08:09:22

(I have tried with "shadow-cljs" instead of "deps.edn + shadow.cljs" but it complained about not finding a valid build or st.)

Jakub Holý08:09:08

Sorry, it is working now

Jakub Holý08:09:24

Perhaps I failed to check :main when I tried it last time

Jakub Holý08:09:51

And navigating to dependencies now works. Thanks a lot!!!

pez08:09:24

There’s an invite link in the channel (latest post from me), and link + password in the channel topic.

pez08:09:53

> And navigating to dependencies now works. Thanks a lot!!! You’re welcome. 😃 It was probably a dependency thing then.

pez08:09:37

FYI, I’d love to have a chat in Gather regardless that you’ve got this working. 😍

Jakub Holý11:09:22

@pez ok! I am in there now

pez12:09:59

It was great to meet!

Jakub Holý13:09:38

💯 ! Thank you!

pez07:09:15

Dear Calva friends, every Wednesday I am sponsored by my employer (https://agical.se) to work with open source Clojure stuff all day! It’s of course most often quite Calva related. I want to try to use Gather Town to give us a space where we can chat, share screens as such and will mostly hang there during all Wednesdays. Please join and hang there you as well. Don’t hesitate to say hello to me if you find me there. I’ll probably be muted, and not looking at that particular tab in my browser, but I think there is a way for you to make me aware that you want to talk. The invite link is here: https://gather.town/invite?token=GZqrm7CR I’ll put the password in the channel topic.

💜 4
calva 2
Ashley Porciuncula10:09:58

Hey Pez! This is a fantastic idea, I love seeing people embrace open hangout spaces. How has your experience been with Gather Town as a platform?

pez15:09:46

I think Gather Town is great. Both for this use and for conferences (which I have only experienced as an attendee, at #clojured this spring). Yesterday I had three visitors and could get much richer feedback than I usually can get. It is wonderfully easy to share screens!

🙌 2
Hukka11:09:38

The live share can also share the web server port when doing web dev, but it fails miserably as it cannot connect to the shadow-cljs hot reload port. Is there a way to share extra ports manually? Or configure it so that it comes automatically

pez11:09:59

I’m pretty sure you can share whatever ports manually with LiveShare.

jarcane12:09:16

Has anyone here had experience using Calva with a juxt/edge project?

pez12:09:04

@jarcane I have. Well, I’m not a user of Edge, but I once created some Calva custom connect sequences for it.

jarcane12:09:44

you might be exactly who I need to talk to then. XD

jarcane12:09:48

we've got an edge project, and i've been using the included rebel script to start our REPL for clj/cljs; but I cannot for the life of me figure out how to get Calva to talk to the cljs part.

pez12:09:12

I’m running live Calva support in Gather today, @jarcane, see some posts above. Only if you prefer that of course. Otherwise we can try figure it out via text here.

👍 2
jarcane12:09:55

Text is easier for me to remember. 😅

pez12:09:55

Cool. Can you describe in more detail the steps you take to connect?

jarcane13:09:04

(apologies, had to step out) Basically as in the docs for Edge. I do

../bin/rebel --cljs --nrepl -A:dev:dev/build:build

jarcane13:09:07

and then do the connect to the running REPL option from calva

jarcane13:09:09

I can see by the build files and the REPL itself that it's using Figwheel Main to do the CLJS stuff, auto-reloading works and all, but Calva can't find it, just complains about missing .cljs.edn files

pez13:09:14

Does the project have an Calva configuration? For instance do you see a project type with “Edge” or something like that in the connect menu?

jarcane13:09:43

I've just been using the deps.edn option and connecting to the port from the terminal repl

pez13:09:48

I have very little experience with Edge. Here’s the configuration I added to the Edge template. https://github.com/juxt/edge/blob/master/lib/edge-app-template/links/cljs_calva_settings.json

jarcane13:09:11

ooh, this looks familiar; like code/setup wise

jarcane13:09:48

oh, and we actually have this file in our version of the template alread.y XD

pez13:09:21

What you can try is to add those settings to the workspace settings of vscode in your project. Then use Calva Jack-in to start the. project, selecting the Edge Figwheel Main project type.

jarcane13:09:05

yes! finally, that got it. I have to make sure to reload the browser once the CLJ REPL starts so the CLJS will trigger and work, but everything's good now.

jarcane13:09:07

Thank you!

jarcane13:09:46

I just had to update the "Clojure CLI" reference to "deps.edn", and then do "Select CLJS Build connection" from the command palette. Otherwise it doesn't seem to pick up the CLJS connection properly

pez14:09:16

Ah, thanks for reporting. That should be changed in the Edge template repo. I didn’t think about that when renaming the Clojure CLI project type…

jarcane15:09:22

The customCljsRepl part also seems to both redundant, and deprecated; works fine without it (provided I run the CLJS build connection separately as mentioned)

pez14:09:07

I'll be out of office (gather) for some hours now. Doesn't mean you others can't party there. 😎

🥳 2
pez21:09:35

A new Calva version is out, v2.0.211, containing a setting that people used to Emacs might like to utilize: • https://github.com/BetterThanTomorrow/calva/issues/1283 Thanks @amar for the PR! gratitude 💜

👍 10
❤️ 2
Eugen07:09:24

cool. I might use this as well, and no emacs here :)