This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-01
Channels
- # 100-days-of-code (2)
- # beginners (83)
- # calva (3)
- # cider (98)
- # clara (3)
- # clj-kondo (2)
- # clojure (84)
- # clojure-dev (59)
- # clojure-europe (11)
- # clojure-italy (22)
- # clojure-madison (4)
- # clojure-nl (3)
- # clojure-spec (24)
- # clojure-uk (80)
- # clojurescript (33)
- # clr (3)
- # datomic (59)
- # events (2)
- # fulcro (20)
- # interop (35)
- # jobs (6)
- # jobs-rus (1)
- # joker (3)
- # kaocha (2)
- # luminus (3)
- # off-topic (16)
- # other-languages (2)
- # pathom (17)
- # planck (2)
- # reagent (1)
- # shadow-cljs (1)
- # test-check (1)
- # tools-deps (49)
- # vim (16)
though it does not work with shadow-cljs, due to some trickery in shadow-cljs, maybe figwheel-main also replaces some of the nrepl stuff with its own ?
in any event, make sure you have a recent everything, and that you're not plugging in some old nrepl via lein
@oskarkv for the buffer loading, or defun evaling, I usually let figwheel/shadow-cljs do its job, and let it reload the file
i didn't notice much missing messages, granted some stuff working with regular clojrue doesn't work with clojurescript, but the experience has generally been good
but not evaluating the buffer....now i'm curious, i've been using shadow-cljs these days
I want to change cider-ns-map from C-c M-n
to C-c C-n
, how can i do this ? And is there a good reason not to use this combination ?
@dpsutton Sorry to bother you, but do you have any idea about those issues I wrote about above? Summarized here too https://www.reddit.com/r/Clojure/comments/c7l9h3/three_issues_with_cider_andor_clojurescript/
I don't know if they are CIDER's fault and if I should create issues on github for them.
> I want to change cider-ns-map from C-c M-n
to C-c C-n
, how can i do this ? And is there a good reason not to use this combination ?
@carkh Just keep in mind that this overrides the command bound to C-c C-n
. I guess you don’t use it, so than this is not a big deal for you.
@oskarkv You could have also posted those as issues on GitHub (bigger chance that someone from our team will go over them). The pretty-printing not working really surprises me, as I can’t see a reason why it wouldn’t work with figwheel-main.
@oskarkv i can look this evening. Can you give the smallest possible repo that i can clone to start investigating? Can much more easily investigate the bug if I don't have to create a similar figwheel main project, make a function that println logs and then throws an error, etc.
hey oskarv, I've looked into it and I've got mixed results. The good thing is that this isn't bad behavior by CIDER because it exactly mimics what happens with cljs.main.
[dan@fedora cljsissues]$ clj -m cljs.main -r
ClojureScript 1.10.520
cljs.user=> (require '[cljsissues.core])
nil
cljs.user=> cljsissues.core/something
nil
cljs.user=> (cljsissues.core/test-println)
Execution error (Error) at (<cljs repl>:1).
Cannot read property 'call' of undefined
cljs.user=>
so I tried your project with figwheel, the with just a bare browser repl with figwheel, and then finally with cljs.main above. It behaved identically every time. The assertion appeared in the browser and not the repl. The defs that occur after the throw expression are not interned
I'll check out what happens with the last issue, printing first and then getting an error. And I'll open an issue on cider's github about the pretty printing
cljs.user=> (cljsissues.core/test-println)
testing println
Execution error () at (<cljs repl>:1).
null
cljs.user=> *e
"ERROR IN test-println"
It prints "testing println" when trying without CIDER, hmYeah, but it doesn't happen in cljs.main. But then the problem might be in figwheel or cider, right?
Anyway, I might have found a clue. If I try to print a lot, then I get the following error
org.eclipse.jetty.websocket.api.MessageTooLargeException: Text message size [131072] exceeds maximum size [65536]
Do you know anything about that?
Is there a way when evaluating a namespace in cide rto also evaluate any required namespaces that may reside in the classpath if possible. for example if I jump into a some.namespace.core.spec
file and it has a require for some.namespace.core
, I first have to go in the core.clj and evaluate it first.
I used cider-eval-ns-form
let me try it from scratch, I think i've seen the buffer work, thought ns would do the same
buffer didn't either
Could not locate dantheobserver/parrot_api/response__init.class,
dantheobserver/parrot_api/response.clj or
dantheobserver/parrot_api/response.cljc on classpath. Please check
that namespaces with dashes use underscores in the Clojure file
name.
this sounds like you've got a classpath issue. maybe the file isn't where clojure thinks it should be?
yeah I had to first load the other file first
/src/dantheobserver/parrot_api
/home/theedeepee/projects/clojure/parrot-api.clj/src/dantheobserver/parrot_api:
total used in directory 24 available 403486944
drwxrwxr-x 2 theedeepee theedeepee 4096 Jul 1 14:24 .
drwxrwxr-x 3 theedeepee theedeepee 4096 Jun 24 23:24 ..
-rw-rw-r-- 1 theedeepee theedeepee 1033 Jun 30 10:30 app.clj
-rw-rw-r-- 1 theedeepee theedeepee 547 Jun 28 20:30 common.clj
-rw-rw-r-- 1 theedeepee theedeepee 526 Jun 26 07:45 response.clj
-rw-rw-r-- 1 theedeepee theedeepee 378 Jul 1 14:24 response.spec.clj
Ah, maybe it's because I run the nrepl alias
I do clojure -A:nrepl
and then do cider connect
maybe connect doesn't evaluate the project
i'm not sure "evaluate the project" is well defined. When nrepl starts up things are on the classpath but it hasn't evaluated the proejct
hmm, It works with jack in, not sure why not with my deps.edn aliases
if I run the application it finds everything fine with clojure -A:server
so it's putting the right files in the classpath
so the mystery deepens. Everything works correctly on your computer if you cider-jack-in
but not if you CIDER connect to clojure -A:nrepl
?
well evaluating the files at least for development
let me check the classpath
try something for me. cider-jack-in
(not cider-connect) and try opening the
namespace. and then do m-x cider-load-buffer
hmm my classpath is
dev
src
/home/theedeepee/.m2/repository/com/github/haifengl/smile-interpolation/1.5.2/smile-interpolation-1.5.2.jar
/home/theedeepee/.m2/repository/org/clojure/clojure/1.10.1-beta2/clojure-1.10.1-beta2.jar
/home/theedeepee/.m2/repository/org/apache/xmlgraphics/batik-dom/1.11/batik-dom-1.11.jar
/home/theedeepee/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar
/home/theedeepee/.m2/repository/generateme/fastmath/1.2.0/fastmath-1.2.0.jar
/home/theedeepee/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar
...(other maven dependencies)
trying that
it loaded fine
I may have changes that aren't on your version
oh yikes lol
this is all wrong, I'm leading you down the wrong path
I was in the wrong project. I was wondering why dev showed up in my classpath when I didn't call it on -A:server
I need to step away from the machine for a bit lol