Fork me on GitHub
#cider
<
2019-02-13
>
ag00:02:15

do cider-find-*-other-window functions work for you? I can’t force it to open it in a new window

ag01:02:49

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?

ag01:02:38

I’d like to jump to result of cider-find-var in other window, but it’s not working 😞

dpsutton07:02:26

@jev i'm sorry i didn't get a chance to help you. We ran really late at work

dpsutton07:02:27

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

cichli09:02:34

I suppose if you have a single git repo containing two subdirectories, each with a lein project in

cichli09:02:35

Emacs would presume the root of the git repo is the project root

cichli09:02:35

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

dpsutton14:02:07

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

dpsutton14:02:33

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

mikepjb09:02:51

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)

jumar12:02:00

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).

jumar12:02:33

For clojure I used this in my project.clj

[org.clojure/clojure "1.10.0" :classifier "sources"]

mikepjb15:02:44

Thanks I will try that out @U06BE1L6T

futuro20:02:39

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. πŸ€”

JaimeV13:02:31

@dpsutton No worries, I can wait if you still want to try.

dpsutton14:02:38

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?

dpsutton14:02:24

ok i'm not having the same issues as you

dpsutton14:02:58

jvm: 11, CIDER 0.21.0snapshot, lein 2.90

dpsutton14:02:08

but i had to do two things to the generated project file:

dpsutton14:02:40

bump figwheel sidecar to 0.5.18, lein figwheel to 0.5.18, and piggieback to 0.4.0

dpsutton14:02:58

@jev sorry the deps are so painful and confusing

dpsutton14:02:29

i created it with lein new re-frame testapp +cider

JaimeV14:02:10

That is the snippet, I have used.

JaimeV14:02:03

lein new re-frame figman +cider

dpsutton14:02:37

ah, figman?

dpsutton14:02:41

oh that's the app name

dpsutton14:02:50

did you do the changes i did?

JaimeV14:02:55

I also tried with chestnut: lein new chestnut pandapp +re-frame +edge

dpsutton14:02:11

ok. so i did lein new re-frame figman +cider

JaimeV14:02:28

I have the right deps with those settings, it works using the figwheel repl, but no with figwheel-main.

dpsutton14:02:33

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 { }
    }

dpsutton14:02:36

made these changes

dpsutton14:02:48

and then cider-jack-in-cljs works for me

dpsutton14:02:03

yes ok i think there is some confusion

dpsutton14:02:35

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

dpsutton14:02:04

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

dpsutton14:02:32

i'm sorry i mislead you

JaimeV14:02:13

Ah. What is the best practice?

dpsutton14:02:58

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

dpsutton14:02:27

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

JaimeV14:02:43

Thanks for the clarification. Can you get the chestnut template to work? It doesn't for me.

dpsutton14:02:44

and i'm always happy to help track down issues with CIDER or clojure/(script) in general

dpsutton14:02:52

yeah let me try it

dpsutton15:02:56

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

JaimeV15:02:27

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.

JaimeV15:02:46

At least, I am not crazy... Tooling is truly a pain.

JaimeV15:02:35

BTW, does your cljs app has a public face?

dpsutton15:02:36

our work product you mean?

dpsutton15:02:50

i'm asking in #chestnut if you want to follow along

dpsutton15:02:10

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

JaimeV15:02:55

We are building a recall app for a medical equipment company

JaimeV15:02:21

#chestnut seems pretty quiet

dpsutton15:02:00

Copy that information and open an issue on the repo?

JaimeV15:02:23

Thanks for the mentoring

andrea.crotti16:02:03

argh this tripped me up quite a bit, doing C-c C-c C-d to show the docs of s/assert (from spec)

andrea.crotti16:02:12

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]

andrea.crotti16:02:17

the core assert instead

andrea.crotti16:02:31

I've never notice that happening for other libraries

andrea.crotti17:02:17

actually this problem only happens with clojurescript

andrea.crotti17:02:24

with Clojure it gives you the right documentation

noprompt18:02:57

Is there a way to use defun-style-indent? IIRC there was a way to do this a while back.

vigilancetech21:02:31

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?

dpsutton21:02:15

what's your cider version and what's your lein version

vigilancetech21:02:30

shadow-cljs version: 2.6.24 node: v8.11.1

dpsutton22:02:27

no lein involved?

dpsutton22:02:56

do you have an explicit requirement on nrepl?

vigilancetech22:02:03

how do I tell the cider version?

vigilancetech22:02:42

oh, here it is: CIDER 0.21.0snapshot (package: 20190213.1612)

vigilancetech22:02:04

: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"]]

dpsutton22:02:54

ok. maybe try without refactor nrepl?

dpsutton22:02:18

i know shadow plays nice. but my testing was using a shadow 2.x.30 i think?

vigilancetech22:02:27

still the same error

vigilancetech22:02:29

can you clone it and see if you get the same result? Maybe its something else in my environment

dpsutton22:02:47

got a link?

dpsutton22:02:01

didn't know it would be that easy. lots of time its a private work repo.

vigilancetech22:02:57

this is just a demo

vigilancetech22:02:24

let me make it public

vigilancetech22:02:42

github on my end says it already is, but the preview above says it isn't πŸ˜•

vigilancetech22:02:11

@dpsutton were you able to get it?

dpsutton22:02:07

i'm cloning now

dpsutton22:02:41

so i dropped the refactor-nrepl dep and was able to crank up the electron build

dpsutton22:02:44

trying client now

dpsutton22:02:11

yeah works for me. i'm not sure where you are getting cider 19 from but that's worrisome

vigilancetech23:02:41

@dpsutton cider 19? You mean 21?

dpsutton23:02:09

> 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

dpsutton23:02:12

this warning you got

dpsutton23:02:21

i don't like 19 there.

dpsutton23:02:30

things work for me because i only have 21 in the mix

vigilancetech23:02:13

with 21 I can't even get to the repl due to the missing file errors

vigilancetech23:02:25

@dpsutton so maybe something I have has an incomplete/broken install?

dpsutton23:02:03

Hard to tell. Did you try without refactor nrepl?