This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-19
Channels
Anyone here ever get a bunch of these warnings when doing a cljs build?
------ WARNING #1 - :undeclared-var --------------------------------------------
Resource: sci/impl/fns.cljc:141:28
Use of undeclared Var sci.impl.fns/clojure
I found this reference to it: https://clojurians-log.clojureverse.org/shadow-cljs/2020-10-30, but I can't find anything like this in my current project: https://github.com/kovasap/cljs-board-gameDoesn't ring a bell. If I execute clojure -Stree
in that project, I don't even see SCI as a dependency
How do you reproduce that message? With clj -M:frontend
? This doesn't get past
[:app] Build failure:
The required namespace "hashp.core" is not available.
on my machineah i do have hashp in https://github.com/kovasap/dotfiles/blob/master/.clojure/user.clj
i should add this to my project code
this is a warning you usually get for referencing a clojure class in cljc files outside a conditional
an old version of what?
(btw i added hashp to my project)
@U02KJ2MN5NU Can you present us with a very clear way to reproduce the problem? What do you run on the command line?
i run ./run.zsh when i'm working on the project
clj -M:frontend
also reproduces tho
[:app] Build failure:
The required JS dependency "react-dom/client" is not available, it was required by "app/interface/core.cljs".
ah sorry, try yarn
i used https://github.com/kovasap/cljs-board-game#setup to start stuff up
but I already see the problem. An old version of SCI is pulled in via hashp -> zprint:
. zprint/zprint 1.1.1
. rewrite-cljs/rewrite-cljs 0.4.5
X org.clojure/tools.reader 1.3.2 :older-version
X borkdude/edamame 0.0.11-alpha.28 :superseded
X org.clojure/tools.reader 1.3.4 :older-version
. borkdude/sci 0.2.1-alpha.1
let me try updating hashp to 0.2.2
what tool did you use to discover this?
what printed your paste above?
oh no i think i may have tried this update before...
ultiple files failed to compile.
------ ERROR -------------------------------------------------------------------
File: jar:file:/home/kovas/.m2/repository/zprint/zprint/1.2.4/zprint-1.2.4.jar!/zprint/comment.cljc:1:1
--------------------------------------------------------------------------------
1 | (ns ^:no-doc zprint.comment
-------^------------------------------------------------------------------------
Invalid :refer, var rewrite-clj.zip/left* does not exist
--------------------------------------------------------------------------------
2 | #?@(:cljs [[:require-macros
3 | [zprint.macros :refer [dbg dbg-pr dbg-form dbg-print zfuture]]]])
4 | (:require #?@(:clj [[zprint.macros :refer
5 | [dbg-pr dbg dbg-form dbg-print zfuture]]])
--------------------------------------------------------------------------------
------ ERROR -------------------------------------------------------------------
File: jar:file:/home/kovas/.m2/repository/zprint/zprint/1.2.4/zprint-1.2.4.jar!/zprint/zutil.cljc:2:1
--------------------------------------------------------------------------------
1 | ;!zprint {:style :require-justify}
2 | (ns ^:no-doc zprint.zutil
-------^------------------------------------------------------------------------
Invalid :refer, var rewrite-clj.zip/right* does not exist
--------------------------------------------------------------------------------
3 | (:require
4 | #?@(:bb []
5 | :clj [[zprint.macros :refer [do-redef-vars]]])
6 | clojure.string
--------------------------------------------------------------------------------
I found an old post of mine at https://github.com/kkinnear/zprint/issues/246#issuecomment-1366386377
looks like i need to solve this problem to get rid of the warningsfixed!
thanks for all the help! the tree command is really useful
it's not recommended to put :deps
in ~/.clojure/deps.edn
- it's best to put those in an alias
hmm. the reason i have things like this is so that when i do small scripting projects with stuff like babashka i'll have this functionality
will aliases work for this?
i also might be misremembering why i set it up this way : P