Fork me on GitHub
#cider
<
2016-05-01
>
plexus08:05:34

@cch1 cider asks nrepl for the metadata of the var you're looking at. In the repl you can try (:file (meta #'your-ns/your-var))

plexus08:05:56

@cch1 in elisp you can then try (cider--find-buffer-for-file "...filename from metadata...")

plexus09:05:45

anyone else here using use-package? what does your clojure setup look like?

plexus09:05:50

this is what I have now

plexus09:05:22

Would love any feedback on that

dottedmag11:05:49

How does CIDER calculate which tests need to be run by C-c C-t p? If I navigate to a buffer with tests and press C-c C-t n there, then my tests are run, but C-c C-t p does not run any.

dottedmag12:05:34

Looks like something is broken (I'm using master, btw). In cider.nrepl.middleware.util.namespace in function load-project-namespaces project-namespaces returns a list of namespaces, which is passed into (map ensure-namespace), but ensure-namespace does (symbol ns) on the argument, which fails with java.lang.ClassCastException clojure.lang.Namespace cannot be cast to java.lang.String.

dottedmag12:05:49

Clojure 1.8.0, CIDER 0.13.0snapshot

malabarba12:05:51

@dottedmag: could you file a bug for that?

dottedmag12:05:13

@malabarba: Yes. I'm gathering more info. Looks like it's Boot-specific.

malabarba12:05:55

Yes. We're still trying to pin down that functionality for boot

dottedmag12:05:22

What's the easiest way to load cider-nrepl in standalone Boot REPL?

malabarba12:05:50

What do you mean?

malabarba12:05:02

Doesn't cider jack in do it?

dottedmag12:05:33

I'd like to run (map symbol (project-namespaces)) in the standalone REPL in the c.n.m.u.namespace ns, just to compare it with the Lein scenario.

malabarba12:05:06

What I always do is visit the cider-nrepl file I want and load it

malabarba12:05:21

Or require its namespace

malabarba12:05:19

But some of the files do some weird dependency magic to support ClojureScript, and then loading it doesn't work

malabarba12:05:54

It complains of a missing class. But it's my first try anyway.

malabarba12:05:18

@cch1: my mistake. I thought you were referring to library files. Yes, I think cider should be able to find your project files. Have you tried evaluating them with C-c C-k?

cch114:05:03

@plexus and @malabarba : following plexus troubleshooting hints, I’m now even more baffled -because everything works as expected except the simple “jump to source"

cch114:05:20

Troubleshooting:

cch114:05:48

1. cider-connect to remote lein repl :headless server (both the cider emacs client and the remote server are running from a git clone of the same repo)

cch114:05:23

2. In the resulting repl, (:file (meta #'exchange/get-rates)) => "apij/lib/exchange.clj”

cch114:05:30

3. From the scratch buffer in emacs, I eval (cider--find-buffer-for-file "apij/lib/exchange.clj”) and the result is #<buffer exchange.clj>

cch114:05:06

4. I can now change to the exchange.clj buffer -which had not been opened before evalin the elisp command.

cch114:05:32

So, why won’t M-. work?

cch114:05:49

FWIW, I see that M-. is bound to cider-find-var

jsa-aerial17:05:34

AFAICT, this looks to be the best place to ask about cider-nrepl. Specifically as embedded in an app. I have

jsa-aerial17:05:11

in my project.clj (this is lein) and this in my -main:

jsa-aerial17:05:26

But I get this when connecting via nrepl:

jsa-aerial17:05:31

WARNING: CIDER's version (0.12.0) does not match cider-nrepl's version (nil). Things will break! WARNING: The following nREPL ops are not supported: artifact-list artifact-versions clean-ns extract-definition find-symbol find-used-locals hotload-dependency namespace-aliases rename-file-or-dir resolve-missing stubs-for-interface find-used-publics version warm-ast-cache Please, install (or update) refactor-nrepl and restart the REPL. You can mute this warning by changing cljr-suppress-middleware-warnings.

jsa-aerial17:05:13

Do I have to 'somehow' include all the middleware stuff manually?

jsa-aerial17:05:38

OMG - I put it in the WRONG server call! It's amazing I couldn't see it until publicly showing my blindness!😱

malabarba17:05:16

@cch1: you could Edebug cider-find-var to figure out what's going wrong

bvulpes18:05:15

cljr-project-clean keeps asking for a place to save a file, i think corresponding to a test file for a particular ns. any notion offhand what might be triggering this or how to stop it?

bvulpes18:05:48

(and then proceeds to hang, so i'll give it a few minutes to complete and then give up on it...)

bvulpes18:05:40

yeah, seems to be having trouble with the com.client.project layout.

jonas18:05:57

When I try to “lookup a symbol in Grimoire” via C-c C-d C-r I get a "400 Bad Request: The plain HTTP request was sent to HTTPS”. Does anyone else see this?

benedek19:05:29

@bvulpes: what do you mean by > yeah, seems to be having trouble with the com.client.project layout

bvulpes19:05:30

it is a very bad guess at what is borking cljr-project-clean

bvulpes19:05:00

for one, project-clean wants to make a test file for every thing along the com.client.project patch

benedek19:05:59

project clean opens or visits (if already opened) all files in the project. it does not create new ones

benedek19:05:34

it shells out and uses find to find files with .clj or .cljc extension

benedek19:05:41

in your project directory

benedek19:05:11

if you don’t want certain files to be touched you can always add them to cljr-project-clean-exceptions