This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # babashka (7)
- # beginners (60)
- # calva (24)
- # cider (2)
- # cljdoc (9)
- # clojure (21)
- # clojure-australia (1)
- # clojure-europe (2)
- # clojurescript (26)
- # core-async (89)
- # datalog (11)
- # datomic (40)
- # fulcro (24)
- # graalvm (5)
- # luminus (1)
- # meander (1)
- # numerical-computing (1)
- # off-topic (3)
- # shadow-cljs (6)
- # test-check (10)
- # tools-deps (7)
- # xtdb (18)
re: scrolling of output and test output -- i have struggled with what to do about test output and one's editor. i ended up punting with trying to do that sort of thing in the editor and went for running things from a terminal. i like the "log" nature of repl output, but definitely find that it's easy to get lost when the output is "big" (cf. the "print" problem mentioned by thheller here: https://github.com/thheller/shadow-cljs/blob/master/doc/remote.md). in general, it seems that when values are output to a single buffer (or terminal) a single large value is enough to make earlier parts of one's "log" very difficult to reach ergonomically. that value can act as a sort of "wall". atm i think it's difficult to do something within the confines of one's editor panes (especially in an editor like vscode). handling larger values seems like it's good for things like rebl, punk, reveal, portal, or shadow-cljs' inspect ui. i don't have any good ideas yet about test output though. has anyone given that any thought?
I played around manually with attaching to Portal from a Webview in a VSCode pane, which works okay. Integrating that with Calva (where say REPL output also gets tap>ed to the Portal pane) might be interesting.
@borkdude thanks, I do think there is a bunch of
:refer :all out there in the wild, many a tutorial or example code out there has it, and over time leaks into projects
Hello everyone! Trying to figure out what I'm missing to get the "Go to definition" to work with my remote nrepl instance. I'm running nrepl server on a external server, have a tunnel setup via ssh to the server over the port. I got the connection and eval to work, but seems "Go to definition" and related functionality doesn't work, and I'm not sure what I'm looking for to get it to work
Hi there, @victorbjelkholm429! My guess is that the nrepl server does not meet the dependency requirements that Calva needs. Try starting the repl using Calva Jack-in and see what dependencies Calva injects on the command line (it is printed in the integrated Terminal). Then make sure youre remote nrepl server has those same dependencies.
Ah, yeah, as soon as I wrote the message I started seeing GitHub issues about not having the right dependencies. Cheers, I'll give that a try! 🙏
@U0ETXRFEW I'm relatively new to developing on windows with visual studio code (coming from vim+arch linux), is there any location where calva stores logs/errors that I can access? Good to know for the future
It depends a bit. For the errors thrown in the main app thread, those go the the ouput/repl window. Some errors might go to the terminal starting the app. If Calva errors it can be examined in the VS Code Dev Console.
@U0ETXRFEW no, I was thinking specifically about Calva logs/errors, in order to debug things if things don't work as I expect, in order to troubleshoot
Update: managed to get it to work. Tricky part was trying to figure out how to inject middlewares when using the embedded nrepl server (instead of the stuff leiningen provides for example). Ended up with this (might be useful to add to the docs?):
(defonce repl-instance (atom nil)) (defn nrepl-handler  (require 'cider.nrepl) (ns-resolve 'cider.nrepl 'cider-nrepl-handler)) (defn start-nrepl-server!  (reset! repl-instance (nrepl/start-server :bind "127.0.0.1" :port 47326 :handler (nrepl-handler))))
Actually, the "Go to definition" doesn't seem to open the right file when I'm using it with my remote nrepl, it reopens the same file but I guess it's using the server location, rather than local location
yeah, hit some errors apparently, https://gist.github.com/victorb/1139cba5491f0c9ac268c0c5f7872a0a
Hm, managed to crash calva completely (and now I get "calva.command not found") by restart vs code and reopen with a .clj selected (found some old messages mentioning that as a possible workaround). Then selected "Connect repl outside of working directory" -> "Generic" -> crash https://imgur.com/a/fECviR6
(sorry for the spam) seems like the path that gets returned somewhere gets wrangled, seeing the error
Unable to open 'core.clj': Unable to resolve resource c:%5CUsers%5Cvictor%5Cinstant-website%5Csrc%5Cinstant_website%5Ccore.clj.
It might be that Calva lacks something to be able to work in that setup. Does this help any? https://calva.io/remote-development/
thanks for the link @U0ETXRFEW, unfortunately it seems focused on "Remote Development" extension which seems to be some sort of binary blob, rather not run that 😕 I ended up just opening up a VNC connection to my computer instead of trying to get VS Code to work my way
If you find the time, I'd appreciate an issue where you summarize what you tried to do and how it didn't work. It might be easy to fix and not so easy to fix, but would be nice to have on the radar.