This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-03
Channels
- # announcements (2)
- # babashka (15)
- # beginners (40)
- # calva (11)
- # cherry (2)
- # cider (3)
- # cljsrn (2)
- # clojure (37)
- # clojure-austin (4)
- # clojure-europe (2)
- # clojurescript (16)
- # core-async (1)
- # datomic (25)
- # hyperfiddle (18)
- # jobs-discuss (9)
- # nbb (7)
- # off-topic (19)
- # pathom (6)
- # podcasts-discuss (4)
- # portal (37)
- # practicalli (1)
- # re-frame (11)
- # releases (1)
- # scittle (13)
- # shadow-cljs (6)
I have been experimenting with gradle recently, but I'm encountering issues with Calva when working with multi-modules. Calva seems to struggle with handling multiple .nrepl-port
files for each module. I believe I need to choose one of the modules declared in settings.gradle
or settings.gradle.kts
and connect to it using the jack-in. if my understanding is correct, I'm planning to submit a PR to improve it. Thanks for making a great project.
I'm not familiar with using gradle, but you can disable the auto selection of an nrepl port from a port file using the setting calva.autoSelectNReplPortFromPortFile
(defaults to true). Maybe with that disabled, you can start your repl(s) without using jack-in, then use the Calva command "Calva: Connect to a Running REPL Server in the Project" - this should prompt you for a host and port for nrepl.
If you want jack-in to work with your project, maybe it can/does, but more info about your project structure would help.
And maybe @U0ETXRFEW can help more here.
I’m not sure what this means:
> Calva seems to struggle with handling multiple .nrepl-port
files for each module.
OTH, I don’t know what multi-modules is either. 😃 Please elaborate a bit, @U03N5K4DZ1D. You could do that in an issue, if you like, describing what the PR would fixing it would do.
The menu selection is omitted in calva Gradle. This will excute ./gradlew clojureRepl
instead of ./gradlew :submodule:clojureRepl
to run the clojureRepl
task in all modules. Because each module's clojureRepl
task creates its own .nrepl-port
, the REPL seems to be confused about which port to select. In my opinion, the problem would be solved by extracting the module declared in settings.gradle
or settings.gradle.kts
with regular expression and making it selectable.
@U0ETXRFEW Do we want to add something specific to Gradle to the jack-in process, or should this be left as a "connect only" scenario?
@U03N5K4DZ1D you are welcome to have a look at what could be done. It sounds a bit brittle with using regex, but it will depend on where we apply them.