calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
pez 2021-03-11T07:57:18.259Z

I’ve updated this PR now. Grab new VSIX from CircleCI if you want something a bit saner than that ^ one.

0xclj 2021-03-11T12:00:21.264700Z

Hi, I’m facing issues when trying to use debugger. I get a No reader function . Example:

(defn xx [x y]
  (+ x y))
ctrl+alt+c i
; Syntax error reading source at (REPL:113:11).
; No reader function for tag dbg
I get No reader function for tag dbg/break when trying to use the debugger. What could I be doing wrong?

pez 2021-03-11T12:09:08.265100Z

@mail.acharyarahul.now How are you starting the REPL?

0xclj 2021-03-11T12:11:36.267100Z

I lein reload to start the service, which starts a REPL at a port. I then Calva-jack-in and specify the port number to connect. The REPL operations themselves have been working well.

pez 2021-03-11T12:16:43.270900Z

I think you mean Calva connect? (jack-in, is a bit of a misnomer, so easy to mix up). Anyway, with jack-in Calva can ensure that its dependencies are satisfied. My wild guess here is that there is some dependency issue. There is a command named something like Copy Jack-in command to clipboard. You can use it to see how Calva would start your project. Then choose wether you want to also use the command line to add the Calva dependencies or if you want to update you project. I think it might solve the problem you have.

bringe 2021-03-11T17:23:41.273200Z

@mail.acharyarahul.now What @pez said sounds correct. I added a section to the docs just now about this: https://calva.io/debugger/#no-reader-function-for-tag-error. Hopefully this helps solve your issue, but if not let us know.

2021-03-11T17:39:16.275100Z

Hi, When I try to jack-in it stucks here, does anyone have idea how to fix that? (in the bottom-left corner I am getting "Launching REPL using leiningen")

pez 2021-03-11T17:40:45.275700Z

What does it say in the Jack-in Terminal?

2021-03-11T17:41:06.275800Z

lein update-in :dependencies conj '[nrepl,"0.8.3"]' -- update-in :plugins conj '[cider/cider-nrepl,"0.25.8"]' -- update-in '[:repl-options,:nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- with-profile +uberjar repl :headless
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.

2021-03-11T17:53:19.276100Z

I noticed that I can connect to "Getting Started" repl, but can't connect via jack-in option

pez 2021-03-11T18:02:40.276300Z

Very strange. It really is stuck. Is it a new project? If you run that command from the terminal manually, what happens then?

pez 2021-03-11T18:03:39.276500Z

What Calva is waiting for is a message announcing that the nREPL server is started.

2021-03-11T18:10:41.276700Z

it's not a new project, it was working a day before 😕

2021-03-11T18:11:38.276900Z

I had VSCode upgraded and I changed some keybindings, but apart from that I didn't tweak anything from previous setup

2021-03-11T18:11:58.277100Z

yes, firing the same command from terminal also getting stuck

pez 2021-03-11T18:12:56.277300Z

Try without the uberjar profile. Maybe you have a dev profile?

2021-03-11T18:16:13.277500Z

tried with dev profile, that's also getting stuck

pez 2021-03-11T18:16:32.277700Z

How about just lein repl?

2021-03-11T18:18:37.277900Z

yup, that also getting stuck

2021-03-11T18:21:54.278100Z

I ran lein test which worked after some initial delay, then tried lein repl which worked, and now I can even jack-in!

pez 2021-03-11T18:22:39.278300Z

Something needed to be cleaned out. Happy it is working again!

2021-03-11T18:23:00.278500Z

right, thanks a lot for your time!

pez 2021-03-11T18:23:23.278700Z

You are welcome! Please consider filing a review on Calva, if you haven’t already. Link in the channel topic. ❤️

2021-03-11T18:23:36.278900Z

sure, will do!

1
0xclj 2021-03-11T22:00:28.279200Z

That does seem to work for debugging local clojure files 😄 But when I jack in, the config is not loaded, and rightly so, because it doesn’t know what/where to load it from as it’s an external edn file that is read from within the code (and I am not sure how to specify it exactly). The way I’ve been working has been to do a lein reload and then do the Connect to a running REPL server in your project and specify the port number of the running REPL. And things work as expected in the REPL ~ this way the config is loaded. Now only if I could get the debugger also working in the same flow, that would help. I’ll have to figure out how to read config during jack-in in the project. cc:// @pez @charliebriggs

bringe 2021-03-11T22:21:59.279400Z

Interesting. I'm not familiar with lein reload. If you want to provide a repo with the project or a similar project we could look at, we may be able to help you better. It does seem like you need to add the proper dependencies to the repl you are starting, though.