This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-11
Channels
- # ai (2)
- # announcements (5)
- # babashka (16)
- # beginners (24)
- # calva (22)
- # clerk (2)
- # clj-yaml (4)
- # cljsrn (1)
- # clojure (15)
- # clojure-dev (7)
- # data-science (5)
- # datalevin (1)
- # emacs (21)
- # events (1)
- # hyperfiddle (33)
- # lsp (71)
- # membrane (1)
- # podcasts-discuss (1)
- # practicalli (11)
- # re-frame (17)
- # reagent (3)
- # sci (1)
- # shadow-cljs (47)
- # transit (1)
Hello John, I hope you are doing well. First of all, many thanks for your online content; it really helps to study :-) Excuse me if this is not the right channel to ask about my issue. I'm just asking here because I have a problem with one of your github repositories. I did fork and clone your repository https://github.com/practicalli/four-clojure . I wanted to start experimenting with the 4clojure exercise within the REPL. That is a very useful idea to really practice and learn. I have just forked and opened one of the Clojure exercies and tried to connect the cider-jack-in-clj. I have got this error: "error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Execution error (FileNotFoundException) at http://java.io.FileInputStream/open0 (FileInputStream.java:-2). -Sdeps (No such file or directory)". I have read those Github issues https://github.com/clojure-emacs/cider/issues/2916, https://github.com/clojure-emacs/cider/issues/2922 and https://github.com/clojure-emacs/cider/issues/2941 . As I am new to Clojure and Spacemacs I did not find a solution to this problem. I see that have long passed since all those issues and things might have evolved. In one issue, you also commented, "I am no longer using cider-jack-in with Clojure CLI tools so will close this issue" and I am even more confused about how to run the exercises :-) What do you recommend me to do to be able to run the clojure code of your repo in a REPL. What would be the correct way to fix the repo, my configuration, java version, etc.? I have attached screenshots of the issue and my clojure environment. Many thanks in advance; any tip would be indeed appreciated. 🙂
First though is that its the alias in the .dir-locals.el
file. The cider-clojure-cli-global-options
variable is depreated and it should be cider-clojure-cli-aliases
Using the older variable may be breaking the cider-jack-in command. I will push an update to the repository to fix the .dir-locals.el
For reference, there is more information about configuration Cider for a project here: https://practical.li/spacemacs/clojure-development/project-configuration/
EDIT: not needed, I've reproduced the issue
Can you share the command that the Cider is using when calling cider-jack-in.
The command will be in the *messages*
buffer (`SPC b m` in Spacemacs)
Or use SPC u
before the cider jack-in command to see the full command line before executing it (it can also be edited)
I can confirm that its the old cider variable name in the .dir-locals.el
file that is causing the issue. I have pushed a couple of commits that update the cider variable and the alias name.
Or you could delete the .dir-locals.el
file as it is not needed for this specific project
The :env/test
alias included in .dir-locals.el
is from the https://practical.li/clojure/clojure-cli/practicalli-config/, so if that is not installed then there will be a warning about the alias not found, although this warning can be ignored as I didnt write any unit tests in the 4clojure project.
Te :env/test
alias adds test
directory as an :extra-paths
so cider test runner can find code under the test
directory (but in this case no such code exists)
For simple and very standard projects, then cider-jack-in
is a convenient way to start a REPL process from Emacs
I often use a https://practical.li/clojure/clojure-cli/repl-reloaded/ with commercial projects so start the REPL process from the command line and include a number of supporting tools. This also means the REPL keeps running if I shut down the editor (or I want to use a different editor)
This approach is something that is not required when first learning with Clojure though
I've added notes to the issue discussions included in the question to inform that cider-clojure-cli-aliases
variable is the correct way to add aliases to cider-jack-in.
If you have any more issues or questions about Practicalli content and examples, dont hesitate to ask (there are no silly questions)
Wow, many thanks, John. It is a pleasure learning Clojure with your content and help. I will reply later when I have tried your fix. Many thanks 🙂
I found a few other projects with the older variable, so your inquiry has helped me fix those too. Thank you.
Wow, many thanks, John. It is a pleasure learning Clojure with your content and help. I will reply later when I have tried your fix. Many thanks 🙂