Fork me on GitHub
Lucas Barbosa12:10:35

Any clues on why clj -R:cider -m nrepl.cmdline -i --middleware '["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware"]' works while clj -A:cider doesn't? It fails with this message:

Execution error at nrepl.cmdline/parse-cli-values$fn (cmdline.clj:248).
EOF while reading

Full report at:
My deps.edn:
{:paths ["src"]
 :deps  {org.clojure/clojure    {:mvn/version "1.10.1"}
         org.clojure/core.async {:mvn/version "0.4.500"}
         com.wsscode/pathom     {:mvn/version "2.2.26"}}

 {:cider {:extra-deps {cider/cider-nrepl {:mvn/version "0.23.0-SNAPSHOT"}
                       refactor-nrepl    {:mvn/version "2.5.0-SNAPSHOT"}
                       nrepl             {:mvn/version "0.6.0"}}
          :main-opts  ["-m" "nrepl.cmdline"
                       "--middleware" "[\"refactor-nrepl.middleware/wrap-refactor\", \"cider.nrepl/cider-middleware\"]"]}}}

Lucas Barbosa12:10:48

The full report:

 "Execution error at nrepl.cmdline/parse-cli-values$fn (cmdline.clj:248).\nEOF while reading\n",
 {:clojure.error/class java.lang.RuntimeException,
  :clojure.error/line 248,
  :clojure.error/cause "EOF while reading",
  :clojure.error/symbol nrepl.cmdline/parse-cli-values$fn,
  :clojure.error/source "cmdline.clj",
  :clojure.error/phase :execution},
  [{:type java.lang.RuntimeException,
    :message "EOF while reading",
    :at [clojure.lang.Util runtimeException "" 221]}],
  [[clojure.lang.Util runtimeException "" 221]
   [clojure.lang.EdnReader readDelimitedList "" 746]
   [clojure.lang.EdnReader$VectorReader invoke "" 672]
   [clojure.lang.EdnReader read "" 145]
   [clojure.lang.EdnReader read "" 111]
   [clojure.lang.EdnReader readString "" 67]
   [clojure.edn$read_string invokeStatic "edn.clj" 46]
   [clojure.edn$read_string invokeStatic "edn.clj" 37]
   [clojure.edn$read_string invoke "edn.clj" 37]
   [nrepl.cmdline$parse_cli_values$fn__1266 invoke "cmdline.clj" 248]
   [clojure.core$fn__8437 invokeStatic "core.clj" 6845]
   [clojure.core$fn__8437 invoke "core.clj" 6830]
   [clojure.core$reduce_kv invokeStatic "core.clj" 6856]
   [clojure.core$reduce_kv invoke "core.clj" 6847]
   [nrepl.cmdline$parse_cli_values invokeStatic "cmdline.clj" 246]
   [nrepl.cmdline$parse_cli_values invoke "cmdline.clj" 242]
   [nrepl.cmdline$args__GT_cli_options invokeStatic "cmdline.clj" 261]
   [nrepl.cmdline$args__GT_cli_options invoke "cmdline.clj" 253]
   [nrepl.cmdline$_main invokeStatic "cmdline.clj" 447]
   [nrepl.cmdline$_main doInvoke "cmdline.clj" 443]
   [clojure.lang.RestFn applyTo "" 137]
   [clojure.lang.Var applyTo "" 705]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.main$main_opt invokeStatic "main.clj" 514]
   [clojure.main$main_opt invoke "main.clj" 510]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "" 137]
   [clojure.lang.Var applyTo "" 705]
   [clojure.main main "" 40]],
  :cause "EOF while reading"}}


Use a , instead of a space in your deps.edn

Lucas Barbosa12:10:58

@dominicm that shouldn't be the issue, since it uses clojure.edn/read-string to read the vector and , are optional :thinking_face: But anyways, I tried and got the same error šŸ™


It doesn't do positional parameters properly though, there's limitations because reasons

Lucas Barbosa12:10:07

Ok, I didn't try replacing the space with a comma, but inserting the comma between the first symbol and the space facepalm removing the space makes it work! Thanks a lot @dominicm


Sorry. I wasn't very clear. Mobile typing isn't amenable to this sort of thing unfortunately.

Lucas Barbosa12:10:17

No problems! Thanks for the help, I spent like 30 minutes trying to figure this one out


IS there a public API document for cider-nrepl? For instance, if I want to build a new client unrelated to any current clients?


Actually, along those lines, is there a simple web-based cider-nrepl client?


Ideally one that supports vega.


Iā€™m not aware of any web-cased nREPL clients.


What is the trick to attach to an nRepl running remotely in a docker container. EMACS thinks it is talking to it but cider gets lost somehow. The last of the nrepl-tunnel logs looks happy: