cider

2024-11-12T16:43:58.654779Z

Not sure where to post this: On wsl2 I get this error when I try to jack-in:

{:clojure.main/message
 "Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).\n-Sdeps (No such file or directory)\n",
 :clojure.main/triage
 {:clojure.error/class java.io.FileNotFoundException,
  :clojure.error/line -2,
  :clojure.error/cause "-Sdeps (No such file or directory)",
  :clojure.error/symbol java.io.FileInputStream/open0,
  :clojure.error/source "FileInputStream.java",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type java.io.FileNotFoundException,
    :message "-Sdeps (No such file or directory)",
    :at [java.io.FileInputStream open0 "FileInputStream.java" -2]}],
  :trace
  [[java.io.FileInputStream open0 "FileInputStream.java" -2]
   [java.io.FileInputStream open "FileInputStream.java" 213]
   [java.io.FileInputStream <init> "FileInputStream.java" 152]
   [java.io.FileInputStream <init> "FileInputStream.java" 106]
   [clojure.lang.Compiler loadFile "Compiler.java" 7588]
   [clojure.main$load_script invokeStatic "main.clj" 475]
   [clojure.main$script_opt invokeStatic "main.clj" 535]
   [clojure.main$script_opt invoke "main.clj" 530]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause "-Sdeps (No such file or directory)"}}

Alex Miller (Clojure team) 2024-11-12T16:49:11.263189Z

do you have the Clojure CLI installed in your WSL there? some linux installs have a clojure script that is not the CLI and that could be what you'd see as output

2024-11-12T17:10:28.219469Z

Now I get:

Error: Could not find or load main class clojure.main
Caused by: java.lang.ClassNotFoundException: clojure.main

Alex Miller (Clojure team) 2024-11-12T17:15:32.354989Z

can you run the clojure CLI at the command line?

2024-11-12T17:20:14.913609Z

Ok, I think it's something to do with my old maven setting that I copied over.

2024-11-12T17:20:23.593109Z

Testing this hypothesis....

2024-11-12T17:22:38.039389Z

Ok that wasn't the issue. I get the same error on the command line when I run 'clj'

2024-11-12T17:23:20.856949Z

oh wait, something didn't work... trying to change my maven settings...

2024-11-12T17:26:50.331719Z

Ok, I fixed my issue. I had changed the maven-local-rep in my deps.edn. I also had it set in my .m2/settings.xml but I forgot that clojure does not honor it there for some reason and so I had added it to deps.edn.

2024-11-12T17:28:48.301609Z

That alternate maven-local-repo would have been fine probably but it had a windows drive letter in it "D:".