This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-14
Channels
- # adventofcode (20)
- # arachne (11)
- # beginners (53)
- # boot (342)
- # cider (54)
- # cljs-dev (39)
- # cljsrn (4)
- # clojure (78)
- # clojure-brasil (2)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-quebec (1)
- # clojure-russia (90)
- # clojure-sanfrancisco (4)
- # clojure-spec (55)
- # clojure-uk (27)
- # clojurescript (170)
- # core-async (1)
- # core-logic (1)
- # css (1)
- # cursive (8)
- # datomic (83)
- # dirac (5)
- # hoplon (24)
- # lambdaisland (1)
- # lein-figwheel (23)
- # midje (2)
- # off-topic (1)
- # om (4)
- # om-next (7)
- # onyx (74)
- # proton (1)
- # protorepl (22)
- # rdf (2)
- # re-frame (105)
- # reagent (15)
- # ring-swagger (3)
- # rum (4)
- # slack-help (17)
- # spacemacs (14)
- # untangled (62)
- # vim (4)
- # yada (18)
@rmuslimov “wrong type argument: stringp, nil” is what I most commonly get
@mikerod I sometimes find I have to eval the buffer before M-.
works. Try C-c C-k
first.
@agile_geek interesting. I’ll have to look into this more. I was specifically trying to navigate to a Java method definition from the REPL buffer, so maybe that is the issue
Here is another Cider question: are there any debugger sort of features that would allow break points to be in Java code that is executed from a Clojure callstack? I’m thinking that is a no, but just seeing if there is anything to look into in that area.
@agile_geek I still get the same "wrong type argument: stringp, nil” or I get “Symbol XXXX not resolvable"
Not sure about Java code ...obviously there are for Clojure code. I would think not.
I’m not sure what I have setup wrong to get this working. I’ll have to dig through the client/middleware to probably understand what it is doing
I think your problem is you're try to jump to Java source and not sure CIDER supports that
Yeah, I know there is the Clojure code debugger. I just wondered if anyone ever tried to cross over into Java land with a debugger as well.
Currently, when I work with Java interop often, I end up just using Eclipse to navigate Java files
so I was trying to decide how hard it would be to get Emacs to let me do this all there
Also, to debug Java code (yuck), that I’m calling from Clojure, I have to use Eclipse CounterClockwise plugin
it actually does have the feature of letting you use the REPL but have breakpoints in Java code you are calling and it pauses and everything like yoi’d expect in a Java debugger. That is one of the only features of CCW that I’m actually pretty happy about. However, I’m much more a fan of Cider/Emacs - it’s just the interop features I’m wishing were there.
You could use IntelliJ and Cursive which is much more sane than Counterclockwise but there's a cost
However, some Java lib code can be hard to just read and figure out. I really don’t like debugging step-by-step, but sometimes that’s what I have to resort to understand a bunch of stateful objects acting as a “machine” in some Java libs.
You could try an Emacs package for Java
Yeah, I thought I might look into that some. Last I looked I thought it didn’t seem to be used much, but I’ll revisit it out of curiousity
@mikerod I've been meaning to try this but haven't yet https://github.com/mopemope/meghanada-emacs
@agile_geek interesting, I will check this one out
@mikerod another option that uses Eclipse in the background - https://github.com/senny/emacs-eclim
@agile_geek another interesting one
then there' s good old jdee of course
About Java, some people had a very good idea, jdee folks started to implement an nrepl middleware
Same as cider, it could provide all the jdk-related functionalities, some of them could be grabbed from cider itself
@richiardiandrea some more stuff to read through
I would be surprised if people weren’t regularly doing at leasts some level of Java interop in Clojure.
yes, there is no pre-made option for Java now, that is why it is important to build it ourselves 🙂
When I run cider-jack-in
on a new lein new APPNAME
project utilizing selmer in APPNAME.core
as in
(ns APPNAME.core
(:require [selmer.parser :as selmer]))
it defaults to a buffer cider-repl APPNAME with a prompt of user>
. However, when I try to run (selmer/render "Hello, {{name}}" {:name "World"})
in the repl, I get the following error message: CompilerException java.lang.RuntimeException: No such namespace: selmer, compiling:(*cider-repl APPNAME*:43:7)
. I have already restarted Emacs and the CIDER repl several times. Does anyone know what I can do to fix this issue?
Does it have to do with the fact that the CIDER repl is not defaulting to the APPNAME.core>
prompt, so perhaps its in the wrong namespace?
Curiously, though, it does produce "Hello, World" when I put (selmer.parser/render "Hello, {{name}}" {:name "World"})
in the repl...
i think you are absolutely qualifying the call to render whereas selmer/render
is using the aliased namespace, which has not been aliased in the current user
namespace
Thanks @dpsutton . I am trying to switch the namespace in the repl using (in-ns APPNAME.core)
but I get the error:
CompilerException java.lang.ClassNotFoundException: APPNAME.core, compiling:(*cider-repl APPNAME*:49:7)
i always use C-u C-c M-z
which switches to whatever namespace I'm in and puts point in the repl
which sounds like a mouthful but I honestly can't remember the shortcuts to type them out but my hands just spit them out by memory now