Fork me on GitHub
#practicalli
<
2022-12-08
>
danielgrosse09:12:16

Hello @jr0cket. I've browsed through your great deps.edn file and stumpled upon the clojure source entry. Is it really necessary to have this downloaded manually? I use doom emacs and there seems to be the source code already available.

practicalli-johnny11:12:18

If referring to :paths ["src"] in the deps.edn file, yes that is redundant as the src path is included in the Clojure CLI install by default. The :deps key was initially included to set a specific version of Clojure other than the install, but that wasnt that useful unless I wanted to set an earlier version of Clojure (e.g. not ready to update to Clojure 11) To help with jumping to the Java sources that are in org.clojure I added

:src/clojure
  {:extra-paths ["src/jvm"]
   :extra-deps
   {org.clojure/source {:local/root "~/projects/community/clojure.org/clojure"}}}

danielgrosse11:12:37

I’ve meant the Clojure sources entry which are pointing to a folder in projects. Below the jvm sources.

lread15:12:09

@U068SUJNT I assume you are talking about this https://github.com/practicalli/clojure-deps-edn/blob/live/deps.edn? Can you share the line numbers in the file you are having difficulty with? Or a link? Here's an example of such a https://github.com/practicalli/clojure-deps-edn/blob/ed8c5caea26e7f51453200e928c8c4f31f45f12b/deps.edn#L73-L78. On github, click on first line, hold shift, click on last line, click on the ... button and then select copy permalink.

practicalli-johnny07:12:55

I already mentioned that source/clojure was to help jumping to the Java source files that are part of the Clojure library. Whether that is needed depends on editor/ide tooling used and if the Java classes are of interest

danielgrosse08:12:36

How is your experience with emacs on that topic? I see that doom emacs is creating copies of the source code in their cache folder. Also what are advantages of using the external repls you have included against the provided one from Cider?

practicalli-johnny22:12:56

I rarely look at the Java Source code in org.clojure/Clojure, I think only once in the last couple of years. The alias helped, I assume with LSP version I was trying at the time. I never had any issues accessing the Clojure or Java source code with Emacs CIDER (with Spacemacs and I assume it's the same with doom). I won't be surprised if LSP or certain editors do not need this alias anymore

practicalli-johnny22:12:56

If I want to access the source code of the Java language itself, there is another alias for that. This helped Cider access the Java source code as t put the source on the REPL classpath

practicalli-johnny22:12:40

The main advantages I can think of for running an external repl include • separation from the editor - the editor can be closed leaving the Repl running, different editors can be used with the same REPL process • Running a Repl on a remote server • Resilience - an editor crash cannot kill the Repl • Long running services - e.g. web services like jetty / http-kit, local log output and service control (integrant Repl) in a separate dedicated terminal window • Easily tailored configuration - specifically for Clojure CLI aliases, especially user level aliases as not all editors directly support user level aliases

practicalli-johnny22:12:54

Oh and my terminal UI is very optimised experience, so I enjoy using its full potential

practicalli-johnny22:12:35

On a side note, it's often easier to show the command of how to do something in Clojure than try and describe how to do something in all the other Clojure aware editors out there