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

Shadowcljs shows error when running calva.loadFile command #1670

Closed
introom opened this issue Apr 7, 2022 · 5 comments
Closed

Shadowcljs shows error when running calva.loadFile command #1670

introom opened this issue Apr 7, 2022 · 5 comments
Labels
bug Something isn't working cljs ClojureScript-related regression Regression error

Comments

@introom
Copy link

introom commented Apr 7, 2022

When running calva.loadFile, shadow-cljs will err with:

[2022-04-07 23:03:41.704 - WARNING] :shadow.cljs.devtools.server.worker.impl/cljs-compile-ex - {:input {:code "(clojure.core/refer-clojure)", :ns starter.browser, :repl true}}
ExceptionInfo Failed to process REPL command {:eof? false, :ns starter.browser, :form (clojure.core/refer-clojure), :source "(clojure.core/refer-clojure)", :tag :shadow.cljs.repl/process-ex}
        shadow.cljs.repl/process-read-result (repl.clj:502)
        shadow.cljs.repl/process-read-result (repl.clj:476)
        shadow.cljs.repl/process-input (repl.clj:661)
        shadow.cljs.repl/process-input (repl.clj:639)
        shadow.cljs.devtools.server.worker.impl/fn--14599 (impl.clj:698)
        shadow.cljs.devtools.server.worker.impl/fn--14599 (impl.clj:688)
        clojure.lang.MultiFn.invoke (MultiFn.java:234)
        shadow.cljs.devtools.server.util/server-thread/fn--14273/fn--14274/fn--14282 (util.clj:269)
        shadow.cljs.devtools.server.util/server-thread/fn--14273/fn--14274 (util.clj:268)
        shadow.cljs.devtools.server.util/server-thread/fn--14273 (util.clj:241)
        java.lang.Thread.run (Thread.java:833)
Caused by:
ExceptionInfo ns* not supported (require, require-macros, import, import-macros, ... must be part of your ns form) {:rename-macros nil, :renames {}, :use-macros nil, :excludes #{}, :name starter.browser, :op :ns*, :env {:fn-scope [], :locals {}, :js-globals {console {:op :js-var, :name console,
@PEZ PEZ added bug Something isn't working regression Regression error cljs ClojureScript-related labels Apr 7, 2022
@PEZ
Copy link
Collaborator

PEZ commented Apr 7, 2022

Thanks! I'll fix.

FYI. Things still work.

@riotrah
Copy link
Member

riotrah commented Apr 17, 2022

Sorry to reopen if inappropriate, but I get an error like this one all the time, and similarly, I believe nothing is actually broken. Are these similar/related?

[2022-04-17 15:17:03.945 - WARNING] :shadow.cljs.devtools.server.worker.impl/cljs-compile-ex - {:input {:code "(load-file \"/\")", :ns cljs.user, :repl true}}
ExceptionInfo Failed to process REPL command {:eof? false, :ns cljs.user, :form (load-file "/"), :source "(load-file \"/\")", :tag :shadow.cljs.repl/process-ex}

@PEZ
Copy link
Collaborator

PEZ commented Apr 19, 2022

Can you make a mini-project that exposes this, @riotrah ? Doubt it is related, but you can start with trying some earlier version of Calva (see changelog, these changes are pretty recent) and check if that makes the errors go away. Regardless, I think that a new issue is the way to go, at least if you can reproduce it in some project you can share.

@bpringe
Copy link
Member

bpringe commented Apr 20, 2022

The only place I see Calva running load-file code like that is here:

const loadForms = `(load-file "${filePath}")`;
. And that function is only run from runNamespaceTests.

@riotrah Are you by any chance calling that command? I don't think it's useful with cljs, but just wondering. Then again, that might not be coming from Calva anyway.

@sam-pitch
Copy link

sam-pitch commented May 17, 2022

Was able to recreate this warning. The key thing is that it appears just when using an older version of shadow-cljs. I confirmed you get the warning using thheller/shadow-cljs {:mvn/version "2.15.12"} but I do not get the warning for the latest (at the time of writting) thheller/shadow-cljs {:mvn/version "2.19.0"}

TLDR; Upgrade shadow-cljs to the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cljs ClojureScript-related regression Regression error
Projects
None yet
Development

No branches or pull requests

5 participants