This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-18
Channels
- # aleph (4)
- # beginners (70)
- # cider (66)
- # clara (16)
- # cljdoc (20)
- # cljs-dev (9)
- # cljsrn (2)
- # clojure (36)
- # clojure-ecuador (2)
- # clojure-italy (14)
- # clojure-japan (2)
- # clojure-nl (22)
- # clojure-uk (79)
- # clojurescript (133)
- # clojutre (2)
- # code-reviews (5)
- # cursive (5)
- # data-science (1)
- # datomic (47)
- # duct (2)
- # emacs (1)
- # figwheel-main (3)
- # fulcro (11)
- # funcool (1)
- # graphql (6)
- # hyperfiddle (4)
- # leiningen (4)
- # luminus (9)
- # lumo (8)
- # mount (4)
- # nrepl (2)
- # off-topic (19)
- # onyx (1)
- # re-frame (23)
- # reagent (91)
- # reitit (17)
- # ring-swagger (2)
- # shadow-cljs (43)
- # tools-deps (27)
- # vim (45)
can I jump to the file when browsing the namespaces? I think this will be much easier than jump file by projectile-find-file
.
@U0NBGRGD6 maybe you want to use cider-find-ns
instead.
You can also press s
when in the browser to jump to the source code of a particular function or a namespace
@bozhidar @hagmonk what is the status of the boot and nRepl? I am back and tomorrow my time I can check and try to come up with the second function for it if I understand correctly
@richiardiandrea I think we fixed it.
Now all the focus is here https://github.com/clojure-emacs/cider-nrepl/pull/540
Yeah I think so too I was wondering if there is any additional step on either side
Oh cool
Getting cider-nrepl
to work with nREPL 0.4, so we can finally make the switch and focus on more creative endeavours.
Well, unfortunately it’s not going very well. I expected it’d be a trivial rename tasks, but some middlewares (like info
and track-state
) are currently not working properly, so I’d love some help in debugging the root of the damn problems.
Uhm ok maybe I can help there then
@richiardiandrea That would be much appreciated!
I would dive in to help, now that I know roughly how things are laid out, but I have a monster work deliverable due in the next 24 hrs. I’ll check in tomorrow to see if there’s anything I can do.
I will add that for asshole grade hangs and/or socket problems, I often lean on jstack or FlameGraphs. Especially the latter, I’ve debugged many perf issues and hangs that way
This guy makes it easy: https://github.com/clojure-goes-fast/clj-async-profiler
@hagmonk Thanks! I’ll likely wait a couple of days before diving into this again with a fresh mind. What puzzles me the most is how can something break if everything is identical and only the namespace has changed. I see that most middlewares are working just fine, there are just some isolated problems and even though there’s error reporting for each middleware op nothing triggers. I’ve left plenty of notes in the PR, so people won’t have to waste time on the things that I’ve discovered so far.
LOL, I know that miserable feeling so well, I feel for you! I think the last time I went on such a wild goose chase was because of a Java API returning a primitive bool false
which is actually truthy in Clojure because it’s not a java.lang.Boolean
. Printing out the value and shouting it’s fucking false, why are you branching like it’s true??? Good times

Yeah, I’m reasonably sure something like this is going to be at the root of the current problem. 🙂
On a related note - can someone help me understand why this simple plugin https://github.com/nrepl/lein-nrepl is raising this error when I try to use it outside its source folder
Exception in thread "main" java.lang.ClassNotFoundException: leiningen.nrepl, compiling:(/private/var/folders/f0/cm24s0qd0s5cch5jvj6ctnb00000gn/T/form-init15686757270206144100.clj:1:126)
Seems that the plugin can’t find its only namespace which looks quite bizarre to me.@bozhidar you could try using fs_events (on Mac, can’t remember command on Linux) to discover the path it’s trying to reach … or see what’s in that temporary .clj file to check for clues there. Reminds me of the weird errors you get if you try to (compile ‘foobar)
and the foobar namespace exists, but the target folder (“classes” by default) does not - you just get an error about not finding a file
Indeed since this error is thrown when compiling, I wonder if that is related … just a guess …
It’s a pity that temp file gets deleted after the compilation failure, so I can’t easily peek into it.
If you do man -k dtrace
there are some other occasionally handy tools. For instance, execsnoop and newproc let you trace transient processes. Often handy in cases where tools are spawning other tools, or you suspect they might be
Hi ciders!
I’m wondering why I’m getting this error command-execute: Wrong type argument: commandp, cider-find-var
when i try cider-find-var
with M-.
debugging a bit the code I had to explicitly add (require 'cider-find)
to cider-browse-ns.el to get it running again ….
does it make sense?
I’m using …
https://github.com/clojure-emacs/cider/commit/82d379c2c5be5bf061931ed29bf95b3cf5440c14
with GNU Emacs 25.3.1 (x86_64-apple-darwin16.4.0, NS appkit-1504.81 Version 10.12.3 (Build 16D32)) of 2018-05-24
I think I've figured out how to get dynamic dependency loading working with nrepl again 🙂
@U09LZR36F that's great! Any details?
I just need to set a context class loader in the right spot 🙂 and I know where that is, just testing. The patch is horribly short, like 10 loc max.
I'm saying it works based on tools.deps.alpha, alembic may need to change a little, I'm not sure on how it works exactly.
network-repl
Clojure 1.9.0
user=> (use 'clojure.tools.deps.alpha.repl)
nil
user=> (add-lib 'org.clojure/core.memoize {:mvn/version "0.7.1"})
Downloading: org/clojure/core.memoize/0.7.1/core.memoize-0.7.1.pom from
Downloading: org/clojure/core.cache/0.7.1/core.cache-0.7.1.pom from
Downloading: org/clojure/clojure/1.6.0/clojure-1.6.0.pom from
Downloading: org/clojure/core.memoize/0.7.1/core.memoize-0.7.1.jar from
Downloading: org/clojure/core.cache/0.7.1/core.cache-0.7.1.jar from
Downloading: org/clojure/clojure/1.6.0/clojure-1.6.0.jar from
true
user=> (require 'clojure.core.memoize)
nil
Promising result!I think that alembic is pretty much dead at this point (I know refactor-nrepl plans to replace it with pomegranate), and there’s also a promising PR there https://github.com/cemerick/pomegranate/pull/102
I don't think that PR would be necessary if my changes are merged. But it could be useful on it's own.
https://github.com/nrepl/nREPL/pull/35 builds are passing, looks good 🙂 I can try pomegranate I guess 🙂
network-repl
Clojure 1.9.0
user=> (use 'clojure.tools.deps.alpha.repl)
nil
user=> (add-lib 'org.clojure/core.memoize {:mvn/version "0.7.1"})
Downloading: org/clojure/core.memoize/0.7.1/core.memoize-0.7.1.pom from
Downloading: org/clojure/core.cache/0.7.1/core.cache-0.7.1.pom from
Downloading: org/clojure/clojure/1.6.0/clojure-1.6.0.pom from
Downloading: org/clojure/core.memoize/0.7.1/core.memoize-0.7.1.jar from
Downloading: org/clojure/core.cache/0.7.1/core.cache-0.7.1.jar from
Downloading: org/clojure/clojure/1.6.0/clojure-1.6.0.jar from
true
user=> (require 'clojure.core.memoize)
nil
Promising result!@tangrammer How did you install CIDER? cider-find-var
is an autoloaded command, so probably in your case something’s wrong with your autoloads. package.el generates those automatically, but perhaps you installed CIDER differently.
Hi Bozhidar! here you are 🙂
(add-to-list 'load-path "~/git/tangrammer/sesman") ;; boths locally cloned
(add-to-list 'load-path "~/git/tangrammer/cider")
(require 'cider)
ups looking now at https://cider.readthedocs.io/en/latest/hacking_on_cider/#obtaining-the-source-code
maybe i need to add (require 'cider-autoloads)
:thinking_face:
sorry about the noise! I thought i have read this doc part 😬
No problem! Finally someone who managed to solve their problem by reading the manual! 🙂
now I’m feeling proud of it
hahaha
@bozhidar how should I be building your PR? I'm getting orchard.misc related issues trying to run your build
Caused by: java.io.FileNotFoundException: Could not locate orchard/misc__init.class or orchard/misc.clj on classpath.
at clojure.lang.RT.load(RT.java:463)
at clojure.lang.RT.load(RT.java:426)
at clojure.core$load$fn__6548.invoke(core.clj:6046)
at clojure.core$load.invokeStatic(core.clj:6045)
at clojure.core$load.doInvoke(core.clj:6029)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5848)
at clojure.core$load_one.invoke(core.clj:5843)
at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
at clojure.core$load_lib.invokeStatic(core.clj:5887)
at clojure.core$load_lib.doInvoke(core.clj:5868)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$load_libs.invokeStatic(core.clj:5925)
at clojure.core$load_libs.doInvoke(core.clj:5909)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$require.invokeStatic(core.clj:5947)
at clojure.core$require.doInvoke(core.clj:5947)
at clojure.lang.RestFn.invoke(RestFn.java:619)
at cider.nrepl.middleware.pprint$eval1518$loading__6434__auto____1519.invoke(pprint.clj:1)
at cider.nrepl.middleware.pprint$eval1518.invokeStatic(pprint.clj:1)
at cider.nrepl.middleware.pprint$eval1518.invoke(pprint.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:7062)
at clojure.lang.Compiler.eval(Compiler.java:7051)
at clojure.lang.Compiler.load(Compiler.java:7514)
Can’t imagine why. I just run lein install
in that brach and that’s all. I don’t even apply MrAnderson when doing my tests.
~/p/cider-nrepl ❯❯❯ ./build.sh install nrepl-0.4
project prefix: cider.inlined-deps
retrieve dependencies and munge clojure source files
retrieving profile artifact.
retrieving tools.trace artifact.
retrieving puget artifact.
prefixing imports in clojure files in 'target/srcdeps/puget' ...
prefixing imports in clojure files in 'target/srcdeps/puget/color' ...
retrieving arrangement artifact.
prefixing imports in clojure files in 'target/srcdeps/cider.inlined-deps/puget/v1v0v2' ...
retrieving compliment artifact.
prefixing imports in clojure files in 'target/srcdeps/compliment' ...
prefixing imports in clojure files in 'target/srcdeps/compliment/sources' ...
retrieving cljs-tooling artifact.
prefixing imports in clojure files in 'target/srcdeps/cljs_tooling' ...
prefixing imports in clojure files in 'target/srcdeps/cljs_tooling/util' ...
retrieving cljfmt artifact.
prefixing imports in clojure files in 'target/srcdeps/cljfmt/indents' ...
retrieving rewrite-clj artifact.
prefixing imports in clojure files in 'target/srcdeps/cider.inlined-deps/cljfmt/v0v5v7' ...
retrieving rewrite-cljs artifact.
prefixing imports in clojure files in 'target/srcdeps/cider.inlined-deps/cljfmt/v0v5v7' ...
retrieving orchard artifact.
prefixing imports in clojure files in 'target/srcdeps/orchard' ...
retrieving dynapath artifact.
prefixing imports in clojure files in 'target/srcdeps/cider.inlined-deps/orchard/v0v3v0' ...
retrieving fipp artifact.
prefixing imports in clojure files in 'target/srcdeps/fipp' ...
retrieving core.rrb-vector artifact.
prefixing imports in clojure files in 'target/srcdeps/cider.inlined-deps/fipp/v0v6v12' ...
retrieving tools.namespace artifact.
prefixing imports in clojure files in 'target/srcdeps/clojure/tools/namespace' ...
retrieving java.classpath artifact.
retrieving tools.reader artifact.
prefixing imports in clojure files in 'target/srcdeps/cljs/tools/reader' ...
prefixing imports in clojure files in 'target/srcdeps/cljs/tools/reader/impl' ...
prefixing imports in clojure files in 'target/srcdeps/clojure/tools/reader' ...
prefixing imports in clojure files in 'target/srcdeps/clojure/tools/reader/impl' ...
Created /Users/bozhidar/projects/cider-nrepl/target/cider-nrepl-0.19.0-SNAPSHOT.jar
Wrote /Users/bozhidar/projects/cider-nrepl/pom.xml
Installed jar and pom into local repo.
Works fine for me. Nothing really changed, so I can’t imagine what can be affecting it (compared to master
).
Having looked a little, I think lein-nrepl#1 has the right idea, you need to add a dep to the project
the plugin example in the lein docs is even about adding a swank dependency to the project!
Yeah, I noticed this. There’s also this approach https://github.com/technomancy/swank-clojure/blob/master/lein-swank/src/leiningen/swank.clj#L59