Fork me on GitHub
#cider
<
2018-07-28
>
arrdem02:07:46

In new CIDER how do I “link” a directory tree to a session?

arrdem02:07:04

It seems to be playing poorly with my checkouts for the most part.

dpsutton03:07:35

some background @arrdem

dpsutton03:07:05

i run 2 to 3 repls at work. i've just gotten into the habit of making a frame for each. I wrote a package to help resize windows which helps because "current session" is dictated entirely by last repl buffer you were in

arrdem03:07:45

Nice! I’m used to the old CIDER functionally global instance behavior and just trying to get acclimated.

martinklepsch19:07:32

I’m getting Namespace not found. messages but don’t understand why — things I’ve checked - namespace can be loaded (require 'namespace) - filename corresponds to namespace name - functions from that namespace can be called in repl after loading it with C-c C-k

martinklepsch19:07:46

I didn’t update, anything but did restart the nrepl session/server/process

martinklepsch19:07:28

I’m also not seeing anything else besides that message in *Messages*

martinklepsch19:07:25

Guess I’ll just upgrade all my packages and hope for the best lol ¯\(ツ)

dpsutton19:07:52

is this a new file by any chance?

martinklepsch19:07:00

I just created it a few minutes ago, not sure if that qualifies as new @dpsutton 😄

martinklepsch19:07:37

I updated all packages and restarted emacs — and it’s working again 😄

dpsutton19:07:38

try (setq clojure-cache-ns nil)

dpsutton19:07:53

there's a namespace cache that has some edge cases right now

dpsutton19:07:03

but i think the update to clojure mode accomplishes that as well

martinklepsch19:07:27

that sounds like it could have been it — I found a bunch of issues in github related to namespace not found — maybe it’s a good idea to open an issue to make this easier to find? (maybe even immidiately close it)

dpsutton19:07:36

there's one open on clojure-mode right now

dpsutton19:07:13

ah, you might be right

dpsutton19:07:44

this is more internal discussion and not a "observed problem" -> "solution". I think the solution is to kill the buffer which kills the buffer-local cached value

genmeblog21:07:00

I sometimes get namespace not found and figured out my case finally. Under cygwin I have symlinked dropbox folder from the other drive. When I create from emacs, path is like ~/dropbox-clj/..../project/src/bbbb.clj. Namespace name is (ns cygdrive.d.Dropbox....project.bbbb). And now, when I change ns to (ns project.bbbb) I'm getting Namespace not found. c-c c-k works perfectly but c-x c-e on a sexp give an error. Reloading a file solves a problem.

genmeblog21:07:23

worth to mention that I run nrepl outside emacs and connect with cider-connect-clj

genmeblog21:07:29

I know that java sees paths as they are on Windows, Emacs sees paths as they are on Cygwin. I remeber that there are functions in cider (or clojure mode) already which take care about translating one into another. Probably case with symlinked folder is too much and it's extreme corner case here.

genmeblog22:07:58

ok, looks like path to replicate namespace not found is simple: open emacs, open project file, cider-jack-in, create new file, change proposed namespace, and that's all. c-c c-k works, c-x c-e doesn't (on any sexp other than ns)

dpsutton22:07:16

That's what I was talking about before

dpsutton22:07:25

try (setq clojure-cache-ns nil)