Fork me on GitHub
#calva
<
2021-12-27
>
brendnz03:12:43

I have two questions, but only one here (companion question is on #clojurescript channel). When I run clj -M --main cljs.main , Clojure on the JVM creates a repl in a firefox browser instance, but does not present a repl prompt at the terminal. I mention this only to show the minimum necessary to get a browser repl loaded whether or not accessible. Calva uses cider.piggieback middleware on a JVM repl. Once cider.piggieback establishes the browser repl, when I send say (+ 1 1) from the repl prompt, does it go to the cider.piggieback middleware first and then get passed to the browser repl, or does it go direct to the browser repl?

bringe03:12:51

I’m not sure, but you might find the answer by looking at the piggieback source and the nrepl docs. Piggieback is nrepl middleware. https://nrepl.org/nrepl/design/middleware.html https://github.com/nrepl/piggieback

brendnz06:12:23

Thanks Brandon, I will read that.

👍 1
Eugen19:12:40

@brandon.ringe: I think this should be added to Clava docs? WDYT? I do have a question (probably more VSCode related) : Can these settings be done on a per project ? I would like to have debugging and logging options enabled only for project-x when I open it, not all projects.

.Calva JVM debugging options
[source,json]
--

    # See docs here  and 
    "calva.jackInEnv": {
        "JAVA_TOOL_OPTIONS": "${env:JAVA_TOOL_OPTIONS} -Dorg.slf4j.simpleLogger.defaultLogLevel=TRACE -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7896"
    },

--

bringe21:12:23

If you think this is something that would benefit others, I think it should be added to the docs.

bringe21:12:03

I think you can set per project/workspace settings in a .vscode directory in the project.

bringe21:12:31

./vscode/settings.json

Eugen21:12:32

thanks, I think so - sometimes you need to be able to debug your clojure app and it's not always obvious how to do that

Eugen21:12:49

I'll see when I can make some time to create a PR

Eugen19:12:09

(I found it in a reply form @pez on this channel). I needed it to be able to debug a clojure app that used some Java libraries. In the above, I change slf4j logging and also enable VM debug mode