This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-09
Channels
- # alda (5)
- # aleph (10)
- # bangalore-clj (1)
- # beginners (168)
- # cider (68)
- # cljs-dev (263)
- # clojars (4)
- # clojure (66)
- # clojure-brasil (25)
- # clojure-china (1)
- # clojure-dusseldorf (1)
- # clojure-greece (4)
- # clojure-italy (3)
- # clojure-russia (4)
- # clojure-spec (12)
- # clojure-uk (16)
- # clojurescript (36)
- # community-development (12)
- # cursive (9)
- # data-science (1)
- # datascript (8)
- # datomic (20)
- # defnpodcast (6)
- # emacs (2)
- # figwheel (2)
- # fulcro (51)
- # graphql (62)
- # immutant (14)
- # keyboards (1)
- # lein-figwheel (10)
- # leiningen (5)
- # lumo (15)
- # off-topic (4)
- # onyx (3)
- # pedestal (4)
- # portkey (13)
- # protorepl (1)
- # re-frame (8)
- # reagent (2)
- # reitit (4)
- # shadow-cljs (71)
- # spacemacs (7)
- # specter (33)
- # sql (9)
- # unrepl (75)
- # vim (7)
@mathpunk I’ve meant to look into this bug for a while, but unfortunately lately I’ve had very little time for OSS projects. As this works in clients like reply (lein repl) I assume the fix should be simply, but someone should do the debugging first.
@gonewest818 What is the purpose of this :robot_face:? https://github.com/clojure-emacs-cider-ci
It’s a Github account from which I generated an API token that only has enough permissions to commit and push changes to the repo (the document generation). That way, if the token gets compromised somehow (it’s theoretically possible) the attacker doesn’t get any more privileges than are absolutely necessary. Compare to just encrypting my GitHub password which would theoretically give the attacker admin access to the repo if the token were compromised.
Done. There’s a limited character count but I got the gist.
Well, I guess we can add some notes about the CI in the readme or something. But maybe after the proposed migration to CircleCI.
I have a weird thing on a project where I can run test at point and tests for ns with cider but test loaded nses or all project tests return "no assertions or no tests were run" I will debug it further but does this ring a bell for anybody?
i think it was that the test paths aren't on the classpath for the profile you are using
yeah I am looking at the middleware code and I can see the filter checking the meta data on ns-interns...
yeah i was rooting around in cider-nrepl and realized i need to fork and clone orchard ot see
(defn project-namespaces
"Find all namespaces defined in source paths within the current project."
[]
(->> (filter (memfn isDirectory) (cp/classpath (class-loader)))
(filter #(.startsWith (str %) project-root))
(mapcat ns-find/find-namespaces-in-dir)))
so i don't think it matters that you've loaded it manually. it's what i thinks "should" be loadedalso could be a bug. i orginally wrote that code to look for a common namespace prefix. but i didn't use project-root because there are examples where the namespace root is different from the project root. cider-nrepl itself was an example
ah nevermind. it's looking at the file paths. are you sure your test dirs are on your classpath?
off from the office now and no win machines at home so back on this on Monday. thx @dpsutton again for looking at it
@benedek Btw, it’d be nice to check what exactly the middleware calls are returning for loaded and project namespaces.
I haven't been able to jack-in for awhile....
Error loading refactor-nrepl.middleware: clojure.lang.ExceptionInfo: Alembic can not manipulate specified ClassLoader. {:classloader #object[jdk.internal.loader.ClassLoaders$AppClassLoader 0x4f8e5cde "jdk.internal.loader.ClassLoaders$AppClassLoader@4f8e5cde"], :reason :not-addable-with-dynapath}, compiling:(mranderson047/alembic/v0v3v3/alembic/still.clj:65:1)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context, compiling:(/private/var/folders/nr/8vbdczz90ps9zfrklvm8jfwm0001yl/T/form-init5367904295233548109.clj:1:7964)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
lein version
Leiningen 2.8.1 on Java 9.0.1 Java HotSpot(TM) 64-Bit Server VM
find . -name user.clj -print
./dev/user.clj
cat dev/user.clj
(ns user
(:require [ :as io]
[clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[com.walmartlabs.system-viz :refer [visualize-system]]
[com.walmartlabs.datascope :as ds])
[reloaded.repl :refer [system init start stop go reset]]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
))
@dcj Remove the injection of refactor-nrepl
(or delete clj-refactor
) and everything will work.
@bozhidar removing clj-refactor from my .emacs did not help. Looking for other places where this might be injected...
@bozhidar It is clearly being injected, but I haven't yet found where/why. Still searching
There's an elisp variable that gets set to remember to inject refactor that doesn't get reset when you uninstall refactor
@dpsutton do elisp variables persist after exit/restarting emacs? Where are they persisted?
@bozhidar here is the complete story of Messages https://pastebin.com/aWUG9h9T
@bozhidar @dpsutton Problem solved! Removing all mention of clj-refactor from .emacs NOT GOOD ENOUGH. Had to actually delete the file from .emacs.d
OK, now I am going to ask a very embarrassing question: From a buffer of clojure code, I jack-in, eventually another window opens, with the user> prompt. How can I automatically or simply be in the namespace of the file I was editing? Basically get Cider to do the (use 'foo) and (ns foo) for me?
defun cljr--inject-jack-in-dependencies () "Inject the REPL dependencies of clj-refactor at `cider-jack-in'. If injecting the dependencies is not preferred set `cljr-inject-dependencies-at-jack-in' to nil." (when (and cljr-inject-dependencies-at-jack-in (boundp 'cider-jack-in-lein-plugins) (boundp 'cider-jack-in-nrepl-middlewares)) (add-to-list 'cider-jack-in-lein-plugins `("refactor-nrepl" ,(cljr--version t))) (add-to-lis
@dcj My fingers do things without me thinking, I think “switch to buffer while loading file and switching to namespace” might be something like C-u C-c M-z
but now I’m doubting myself
@dcj np, btw if you’re like me and prefer route memorization to documentation I constantly create Quizlet sets for this sort of thing https://quizlet.com/270049605/cider-repl-flash-cards/
@dcj Throwing the book at you wasn’t meant to be dismissive, http://cider.readthedocs.io is ESSENTIAL