This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-12
Channels
- # announcements (1)
- # babashka (42)
- # beginners (114)
- # bristol-clojurians (2)
- # calva (7)
- # cider (4)
- # clj-kondo (7)
- # cljs-dev (37)
- # cljsrn (13)
- # clojure (114)
- # clojure-austin (3)
- # clojure-europe (5)
- # clojure-nl (10)
- # clojure-spec (77)
- # clojure-sweden (4)
- # clojure-uk (16)
- # clojurescript (52)
- # conjure (155)
- # core-async (18)
- # cursive (23)
- # datomic (20)
- # duct (2)
- # emacs (13)
- # figwheel (3)
- # figwheel-main (9)
- # fulcro (31)
- # gis (8)
- # helix (33)
- # jobs (12)
- # jobs-discuss (66)
- # kaocha (4)
- # lein-figwheel (1)
- # meander (16)
- # off-topic (5)
- # pathom (13)
- # pedestal (6)
- # quil (6)
- # rdf (17)
- # re-frame (32)
- # reagent (34)
- # reitit (30)
- # remote-jobs (1)
- # ring (2)
- # shadow-cljs (149)
- # spacemacs (1)
- # sql (8)
- # tools-deps (90)
- # xtdb (19)
I can’t connect to a REPL running in a remote server when port forwarding it to a localhost port. Does anyone else face this issue?
@U0567Q30W I get the following error
Connecting to remote Socket REPL...
EOF while trying to sync input stream.
Disconnected from remote server.
Exception while trying to sync input stream: .SocketException: Socket closed
If I chose nREPL instead of socket repl it is always stuck with this
Connecting to remote nREPL server...
I never really use clojure.repl/doc
since Cursive has the great built-in quick doc functionality. I did recently learn that clojure.repl/doc
shows the function's :args
and :ret
as defined by a fdef
. It would be awesome if Cursive could do the same! Here's an example output of clojure.repl/doc
:
(clojure.repl/doc my-add)
-------------------------
user/my-add
([x y])
Adds x and y together, returning the sum.
Spec
args: (cat :x int? :y int?)
ret: int?
Function's source:
(defn my-add
"Adds x and y together, returning the sum."
[x y]
)
(s/fdef my-add
:args (s/cat :x int? :y int?)
:ret int?)
Hello 🙂 Has anyone tried using Cursive for remote debugging (e.g. via nREPL host/port)? It seems that selecting nREPL effectively disabled/greys out the debug option in . This is for a Dockerised environment I am currently running. Alternatively, I tried using the standard (non REPL) remote debugger on a Java debugger port - the breakpoints seem to work, however, sometimes variables show as null. My understanding is that in order to have the debugger working well, you have to connect to the REPL debugger or is connecting to standard agentlib debugger port (Remote Debug) the same?
https://groups.google.com/forum/#!msg/cursive/iTri7vvXViA/veDAU6qlDAAJ So e.g. in this user group thread, Colin suggested connecting to 5005 using a standard Remote Debug - so is there any difference between the two in terms of debugger capabilities?
That’s actually not my message, the previous one: https://groups.google.com/d/msg/cursive/iTri7vvXViA/SZkyw6GlDAAJ is from me, and explains how to actually make the connection. 5 years on, I should have this properly documented by now.
But the critical bit to understand is that the debugger and the REPL are totally separate and use separate connections. The REPL does the evaluation part, and then debugger does the debugging bit.
@U0567Q30W Thank you for responding! I am very impressed with the plugin, it's got much better since I used it last time a few years back and I was able to make it all work with the debugger via socket attach as per your post. So do you think it's safe to say that as far as debugging 'working' is concerned, it should work as good as when started via 'Debug "REPL"'"? I assume so, as you said the debugging and repl are totally separate. That would mean I can safely argue that you can wholly run a dev Clojure inside docker and not lose any debugging capabilities 😊
Thanks for the kind words, I’m glad Cursive works well for you! Yes, that’s right, the debugger is totally equivalent when run remotely and when starting the process explicitly.
Is there any way to have Cursive format code according to bbatsov’s clojure-style-guide? Specifically, adhering to its https://github.com/bbatsov/clojure-style-guide#body-indentation vs https://github.com/bbatsov/clojure-style-guide#one-space-indent indentation rule where it suggests having only a single space indent when there are no arguments on the same line as the function, but a 2-space indent when dealing with bodies of forms that have body paramaters?
That’s at Preferences | Editor | Code Style | Clojure | General | One space list indent
That one is contentious, and I maintain that it’s a bad idea propagated by emacs, but that might just be me.
It’s definitely not just you! I think the Cursive defaults are much nicer than what this styleguide suggests. I’m just trying to play well with the team if we stick to this guide.
Sure, hopefully all the options should be there to match e.g. Emacs. If you find you’re missing something, let me know.
the rule is not even automatically enforcible… plenty of macros have 2 space identation, but not all
should have just searched for it 🙂 https://apple.stackexchange.com/questions/122514/how-do-i-do-a-diagonal-arrow-keyboard-shortcut