Fork me on GitHub
#calva
<
2019-08-06
>
cheatex08:08:39

Hi. I have a problem debugging fullstack app in calva. I use a template from $ lein new re-frame dd +cider +handler. When i run the resulting app from lein, $ lein figwheel whatever I print with core/println from server code pops up in repl and figwheel_server.log. But when I run calva jack-in that output is just lost.

cheatex08:08:09

Probably it has the same root cause, but my case is about debugging ring handlers.

cheatex08:08:25

... and changed log behavior of figwheel.

pez08:08:36

This probably has nothing to do with it, but that +cider option might screw things up. I am guessing it adds cider dependencies to the project.clj, which might conflict with the ones Calva jack-in injects.

cheatex08:08:58

I'll try to clean them up and see what happens.

cheatex09:08:34

Removing cider dependencies doesn't help

pez15:08:22

I didn't think it would help. I have some little time now to listen to the problem. That re-frame template, does it create a lein-figwheel or a figwheel-main, project?

pez15:08:23

Hmmm, it created a shadow-cljs project for me...

cheatex15:08:34

It creates a lein-figwheel project

pez15:08:25

calva-friends: I have a suggestion. If you add calva-friends to your My Keywords notifications settings for this slack, then you'll get a badge on this channel when someone uses that word. I'll use it when I want your attention on something. Slack won't beep or flash anything, it will just badge the channel.

pez15:08:52

That said. calva-friends: I have some good news. Calva was selected for Q3 funding by Clojurists Together! Please spread the word! It means I will spend even more time with Calva and I will try get some stuff done that otherwise I deem are a bit to big/boring. It will be documentation, quality work/refactoring, but also some feature adding. @slack1038 has starting to bring some refactoring support into Calva and I will join in that. I don't know if I'll be able to also get some time to ease the pain points with the REPL window, but I will certainly try.

chris54716:08:15

Congrats @pez! this is exciting for you - how is the REPL window currently implemented - is there support in VSCode or did you have to shoehorn something in?

pez16:08:30

@chris547, thanks! We had to shoehorn it in. It is implemented with a Webview. Underneath there is a whole new Clojure editor, with syntax highlighting, formatting, structural editing and all that. In theory this is great. But it gets to be a project of its own that I do not have the time to maintain (nor the time to gain the skills for, it was written by a genius frontend coder). It has lots of small and some big issues and I just don't have a good idea for how to dig myself out of the trap. I am currently thinking I should replace it using a coming virtual terminal API, but I haven't experimented with that enough to see if it is good enough.

chris54716:08:03

Wow, that does sound, um complicated! Well thanks for taking the time to explain it plus contribute to the community! Looking forward to seeing your progress!

pez16:08:28

It's a mess. But we'll figure something out. Meanwhile people will have to live with it being a bit quirky.