Fork me on GitHub
oliver marks14:12:23

I have a clojure / clojurescript project, curious if there are any thoughts on the filename interface as it gives you warnings "contains a reserved JavaScript keyword" and renames to interface$ is there a way to use an alternative to interface as a filename / namespace for projects including cljs ?


The default name of the interface namespace is interface. It can be changed in workspace.clj to something else, e.g. ifc or something, by setting the :interface-ns keyword.

oliver marks14:12:45

okay thanks for that info 🙂


I'm running a project that has a nrepl server, and a classpath root is in the workspace/projects/foo. The nrepl port file is stored there, and I connect to the repl from emacs with cider-connect command. If I'm in the base or component, the cider-connect cannot find the port number. Is there any idiomatic way to handle this?


I'm curious: why are you running the nREPL from a project instead of from the workspace-level with the :dev project>


The recommended approach is to start the REPL in the workspace root, then connect your editor to it. Then the stored port number will be in a file at the root, and cider-connect should look up the file tree to find that file, no matter while file you have open.


sometimes I have to run 2 projects at the same time, and I don't want them to share working directory


One of the big benefits to Polylith is running a single REPL with your entire codebase available in it.

polylith 1

I have projects with mutually exclusive system state, and for debugging I need both to be running a repl. It's not possible to have a single repl for both of them


It generally is if you use Component for such things. That's how we develop/test/debug our projects where we need a "cluster" of processes running in the same JVM. What are you using for state/lifecycle management?


Seems an interesting question from a #cider point of view, did you get to solve it? It might be interesting (if not already implemented) to be able to teach cider to look for .nrepl-port files in different directories, according to a "mapping rule" of sorts