Java library to control nREPL launch from Java code
Because
NreplBridge bridge = new NreplBridge();
bridge.bootServer("127.0.0.1", 1337);
is way better than invoking Clojure code directly to achieve the same.
Don't worry, I got you covered. You can pass handler function reference or symbol name as a string
(it'll get dereferenced via (symbol <handler>)
)
bridge.bootServerWithHandler("my.namespace/cool-nrepl-handler", "127.0.0.1", 1337);
I know, here's a workaround:
String ciderBoot = "(ns user-cider-fix)" +
"(defn cider-nrepl-handler []" +
" (require 'cider.nrepl)" +
" (ns-resolve 'cider.nrepl 'cider-nrepl-handler))";
Compiler.load(new StringReader(ciderBoot));
Object ciderHandler = RT.var("user-cider-fix", "cider-nrepl-handler").invoke();
bridge.bootServerWithHandler(ciderHandler, "127.0.0.1", 1337);
Best I could come up with right now, sorry. Ideally this should be provided as an utility function (TODO)
Copyright © 2019 Mark Vainomaa
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.