Fork me on GitHub
#polylith
<
2021-12-03
>
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 ?

tengstrand20:12:07

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 🙂

wagjo15:12:53

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?

seancorfield18:12:22

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

seancorfield18:12:03

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.

wagjo18:12:44

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

seancorfield18:12:01

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

polylith 1
wagjo16:12:24

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

seancorfield17:12:26

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?

vemv12:12:37

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