Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow-cljs Documentation says to use iced repl {build id} but it doesn't work #460

Open
DeepReef11 opened this issue Jun 5, 2023 · 2 comments

Comments

@DeepReef11
Copy link

DeepReef11 commented Jun 5, 2023

Edit2: Was able to make it all work with Logseq with yarn watch, Calva Repl in VSCodium and then launching logseq. Then I open nvim and do IcedConnect, Y and I can send commands to Logseq (with the dev plugin installed on Logseq of course).

Edit: Figured part of it. It works with iced repl --force-shadow-cljs app. Now, I'm trying to launch a simple message into Logseq but it doesn't work. How am I supposed to make this work? With Calva (VSCode) it works, but it prompt to launch logseq (won't work if logseq is already opened). So I suppose there should be something that use logseq instead of localhost:8080. What should I do?

I think this part of doc should be updated https://liquidz.github.io/vim-iced/#clojurescript_shadow_cljs

Original post

I'm trying to use vim-iced for a logseq plugin. I recall being able to get the REPL working in neovim, but it doesn't work anymore, no idea why (note that this is new, it's not like something that was working properly but just that I was able to get something working once, no idea what I've done that no longer work but so far I haven't been able to make it work with logseq plugin). I've added mentioned deps in shadow-cljs.edn and the .nrepl.edn file.

When I use iced repl :app, I get this error:

OK: CLJS option is enabled.
OK: Clojure CLI project is detected
WARNING: Implicit use of clojure.main with options is deprecated, use -M
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
{:app} (No such file or directory)

Full report at:
/tmp/clojure-5819435151716190319.edn

/tmp/clojure... contains:

{:clojure.main/message
 "Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).\n{:app} (No such file or directory)\n",
 :clojure.main/triage
 {:clojure.error/class java.io.FileNotFoundException,
  :clojure.error/line -2,
  :clojure.error/cause "{:app} (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 "{:app} (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" 219]
   [java.io.FileInputStream <init> "FileInputStream.java" 157]
   [java.io.FileInputStream <init> "FileInputStream.java" 112]
[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 "{:app} (No such file or directory)"}}


I do have :build {:apps ...} in shadow-cljs.edn. What am I supposed to do?

@liquidz
Copy link
Owner

liquidz commented Jun 6, 2023

@DeepReef11 Thank you for your reporting!
I'll have a look this weekend.

https://github.com/liquidz/vim-iced/blob/main/doc/pages/clojurescript/shadow_cljs.adoc
PR is also very welcomed!

@DeepReef11
Copy link
Author

DeepReef11 commented Jun 7, 2023

Thank you.

I just wanted to mention that there is VS Codium that is VS Code without Microsoft telemetry in case someone wants to avoid VS Code­ in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants