This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-13
Channels
- # adventofcode (35)
- # announcements (2)
- # arachne (1)
- # beginners (71)
- # chestnut (2)
- # cider (100)
- # cljdoc (17)
- # cljs-dev (17)
- # cljsjs (2)
- # cljsrn (2)
- # clojure (53)
- # clojure-austin (2)
- # clojure-europe (1)
- # clojure-finland (2)
- # clojure-italy (3)
- # clojure-nl (7)
- # clojure-russia (56)
- # clojure-spec (56)
- # clojure-uk (35)
- # clojurescript (58)
- # community-development (14)
- # core-async (9)
- # cursive (22)
- # data-science (5)
- # datomic (14)
- # duct (5)
- # emacs (2)
- # expound (4)
- # figwheel-main (6)
- # fulcro (23)
- # kaocha (8)
- # lumo (7)
- # off-topic (10)
- # pathom (6)
- # re-frame (17)
- # reitit (31)
- # ring (3)
- # rum (1)
- # shadow-cljs (45)
- # spacemacs (10)
- # sql (12)
- # testing (9)
- # tools-deps (130)
do cider-find-*-other-window
functions work for you? I can’t force it to open it in a new window
could this be a bug in cider-common.el/cider-find-file
? It seems at least one of the find-file-noselect
should be find-file-other-window
conditionally?
My attempt to fix it https://github.com/clojure-emacs/cider/pull/2583
to anyone else: i notice that there's a prefix argument to jacking in but I've never used it and it does 2 things, one of which seems weird. It lets you specify the base directory of the project (which seems weird to me) and then it lets you edit the options to jack in. I want to rejigger this so that the prefix lets you edit the raw jack in command so its easy to see where different options go. The real question is the current behavior goes with a double prefix arg or if it can just be clobbered. It seems strange to set the project root but just wondering if anyone could chime in on that
I suppose if you have a single git repo containing two subdirectories, each with a lein project in
Emacs would presume the root of the git repo is the project root
But I think having them the other way around, like you suggest, could make sense. One prefix arg to see/change the options, two prefix args to see/change the options AND change the project root. We could also use a negative prefix arg for one
ah. yeah. however, the way the project root stuff works is backtracking so i've never thought to use this in our own "monorepo" of sorts
also, i've got a patch that rather than doing args you get to edit the entire jack in string and i think i prefer that more
Does anyone know how to jump to java references in clojure code?
I've managed to do this for jdk src with (setq cider-jdk-src-paths '("/usr/lib/jvm/java-8-openjdk/src.zip"))
which is great. 🚀
However, I have not been able to do the same for java code written in the same project that the clojure code references e.g
(def java-based-lookup (ImportantJavaClass/THELIST)
If sources are on the classpath you should be able to jump there. I was able to do this before with clojure java sources although, honestly, it's quite annoying and sometimes lead to weird issues (that was the case with mixing both standard clojure jar and "source" artifact).
For clojure I used this in my project.clj
[org.clojure/clojure "1.10.0" :classifier "sources"]
Thanks I will try that out @U06BE1L6T
That's what I've done in the past as well. It worked, but it would also be neat to have a lein plugin or some such that brought in source jars as well. :thinking_face:
I'm making coffee and then i'm gonna try to recreate. can you put the exact command line snippet i should use to create the app like you did?
I have the right deps with those settings, it works using the figwheel repl, but no with figwheel-main.
1 file changed, 3 insertions(+), 3 deletions(-)
project.clj | 6 +++---
modified project.clj
@@ -19,10 +19,10 @@
:profiles
{:dev
{:dependencies [[binaryage/devtools "0.9.10"]
- [figwheel-sidecar "0.5.16"]
- [cider/piggieback "0.3.5"]]
+ [figwheel-sidecar "0.5.18"]
+ [cider/piggieback "0.4.0"]]
- :plugins [[lein-figwheel "0.5.16"]]}
+ :plugins [[lein-figwheel "0.5.18"]]}
:prod { }
}
figwheel is a set of dependencies to get a clojurescript repl up. figwheel-main is another set of dependencies, kind of the successor of figwheel to achieve the same thing
to use figwheel main you need to remove figwheel deps and switch over. when i said you should use figwheel main i meant as in you should follow the setup for that
well, i think figwheel main is considered the best practice. that said, i'm sure there are thousands of real projects still on figwheel. our main work product, a cljs app of 60k lines is a figwheel project
but if you're learning i would look at figwheel main. I know this tooling stuff sucks though so make sure not to do too much tooling and get back to actual coding/learning/fun
Thanks for the clarification. Can you get the chestnut template to work? It doesn't for me.
and i'm always happy to help track down issues with CIDER or clojure/(script) in general
i'm unable to get this one working. It does a trick where the compiled output goes to dev-target/public/js/compiled/
and then there's a middleware that exposes this but it's not seeming to work
Ok. Thanks for the help. I am going to try with the figwheel-main and avoid chestnut for now. I kind of like the bells and whistles that it comes from, but I need to focus on learning and moving fun project forward.
no our cljs app is an internal app for our doctors. I work at a pediatrician's office but start a new job on tuesday
argh this tripped me up quite a bit, doing C-c C-c C-d
to show the docs of s/assert
(from spec)
actually gives you
cljs.core/assert
[x]
[x message]
Evaluates expr and throws an exception if it does not evaluate to
logical true.
cljs.core/assert is defined in jar:file:/Users/acrotti/.m2/repository/org/clojure/clojurescript/1.10.439/clojurescript-1.10.439.jar!/cljs/core.cljc.
[back]
the core assert instead
I've never notice that happening for other libraries
actually this problem only happens with clojurescript
with Clojure it gives you the right documentation
Is there a way to use defun-style-indent
? IIRC there was a way to do this a while back.
after updating to cider-nrepl 0.21.0 and the latest cider I'm getting:
CompilerException java.io.FileNotFoundException: Could not locate nrepl/middleware/caught__ini
t.class or nrepl/middleware/caught.clj on classpath., compiling:(cider/nrepl.clj:1:1)
clojure.lang.Compiler.load (Compiler.java:7526)
clojure.lang.RT.loadResourceScript (RT.java:379)
clojure.lang.RT.loadResourceScript (RT.java:370)
clojure.lang.RT.load (RT.java:460)
clojure.lang.RT.load (RT.java:426)
clojure.core/load/fn--6548 (core.clj:6046)
clojure.core/load (core.clj:6045)
clojure.core/load (core.clj:6029)
clojure.core/load-one (core.clj:5848)
clojure.core/load-one (core.clj:5843)
clojure.core/load-lib/fn--6493 (core.clj:5888)
clojure.core/load-lib (core.clj:5887)
Caused by:
FileNotFoundException Could not locate nrepl/middleware/caught__init.class or nrepl/middleware
/caught.clj on classpath.
clojure.lang.RT.load (RT.java:463)
clojure.lang.RT.load (RT.java:426)
clojure.core/load/fn--6548 (core.clj:6046)
clojure.core/load (core.clj:6045)
clojure.core/load (core.clj:6029)
clojure.core/load-one (core.clj:5848)
clojure.core/load-one (core.clj:5843)
clojure.core/load-lib/fn--6493 (core.clj:5888)
clojure.core/load-lib (core.clj:5887)
clojure.core/load-lib (core.clj:5868)
clojure.core/apply (core.clj:659)
clojure.core/load-libs (core.clj:5925)
and it fails when I try and cider-connect-cljs with this project: https://github.com/vigilancetech-com/shadow-hoplon-electron.git
It worked (somewhat) before that (with cider-nrepl-0.19.0-SNAPSHOT) but said:
WARNING: CIDER 0.21.0-snapshot requires cider-nrepl 0.20.0+, but you're currently using cider-nrepl 0.19.0-SNAPSHOT. Things will break!y
help?shadow-cljs version: 2.6.24 node: v8.11.1
how do I tell the cider version?
oh, here it is: CIDER 0.21.0snapshot (package: 20190213.1612)
no lein
:dependencies [[refactor-nrepl "2.4.0"]
[org.clojure/clojure "1.10.0-alpha6"]
[org.clojure/clojurescript "1.10.339"]
;; [vigilancetech-com/hoplon "6.0.0-alpha17"]
[hoplon/hoplon "7.1.0"]
[cider/cider-nrepl "0.21.0"]]
still the same error
can you clone it and see if you get the same result? Maybe its something else in my environment
this is just a demo
let me make it public
github on my end says it already is, but the preview above says it isn't 😕
@dpsutton were you able to get it?
yeah works for me. i'm not sure where you are getting cider 19 from but that's worrisome
@dpsutton cider 19? You mean 21?
> WARNING: CIDER 0.21.0-snapshot requires cider-nrepl 0.20.0+, but you're currently using cider-nrepl 0.19.0-SNAPSHOT. Things will break!y
with 21 I can't even get to the repl due to the missing file errors
@dpsutton so maybe something I have has an incomplete/broken install?