Fork me on GitHub
#cider
<
2020-01-07
>
yuhan10:01:36

Is there a command which will clean up all vars in the current ns and reload it?

bozhidar10:01:50

@qythium cider-ns-refresh?

bozhidar10:01:16

(it uses tools.namespace internally)

yuhan10:01:22

I find that to be too unreliable and extreme, it tries reloading all code in the entire project

bozhidar10:01:36

There’s also cider-ns-reload, which does (require :reload).

yuhan10:01:58

cider-ns-reload doesn't get rid of temporary defs though

bozhidar10:01:43

We were thinking in the past it might be a good idea to have a variant of undef-var that removes everything from an ns and then does require afterwards, but this was never implemented.

bozhidar10:01:49

Shouldn’t be hard, though.

bozhidar10:01:07

Just one more op in cider-nrepl.

yuhan10:01:58

would it simply be something like

(doseq [[sym _] (ns-map *ns*)]
  (ns-unmap *ns* sym))
followed by cider-load-buffer?

kirill.salykin14:01:04

hi, I am trying to expose nrepl from docker container but facing [nREPL] Connection closed unexpectedly (connection broken by remote peer)

command: ["clojure", "-R:repl:test",
              "-m", "nrepl.cmdline",
              "--port", "9091",
              "---host", "0.0.0.0",
              "--middleware", "[\"cider.nrepl/cider-middleware\"]"]

kirill.salykin14:01:44

:repl        {:extra-deps {nrepl/nrepl       {:mvn/version "0.6.0"}
                             cider/cider-nrepl {:mvn/version "0.23.0-SNAPSHOT"}}}

kirill.salykin14:01:53

port 9091 also exposed

kirill.salykin14:01:01

please advice what can be the issue?

kirill.salykin14:01:54

it should’ve been bind to 0.0.0.0