Fork me on GitHub
Jakub Holý (HolyJak)13:10:19

Any tips for troubleshooting when shadow-cljs (2.11.1) gets stuck? I run

$ node_modules/.bin/shadow-cljs watch :main
shadow-cljs - config: /Users/holyjak/Work/customersupport-app/shadow-cljs.edn
shadow-cljs - starting via "clojure"
DEPRECATED: Libs must be qualified, change refactor-nrepl => refactor-nrepl/refactor-nrepl (/Users/holyjak/.clojure/deps.edn)
DEPRECATED: Libs must be qualified, change mount => mount/mount (deps.edn)
DEPRECATED: Libs must be qualified, change hiccup => hiccup/hiccup (deps.edn)

# now it printed nothing more for minutes...
server has the same issue.


first guess would be that you have a user.clj that does stuff on load?


besides that not a clue


maybe you need to fix you deps.edn issues


maybe try running just clj with whatever aliases you might need


and then (require '[shadow.cljs.devtools.server :as srv]) and (srv/start!)

Jakub Holý (HolyJak)13:10:40

Thank you! Running clj and starting it manually from there worked just fine! 🎉

Sam Ritchie14:10:57

Hey all... I THINK this is a simple process but just wanted to check in to be sure. I'm moving toward release for, and want to add a shadow-cljs.edn before I do this

Sam Ritchie14:10:42

Am I right in thinking that... maybe this actually has nothing to do with library release, and more / all with developer experience?


I don't understand the question


a library does not need a shadow-cljs.edn at all and in fact would have no effect whatsoever

Sam Ritchie14:10:19

that's the reassurance I was looking for! just trying to find my feet

Sam Ritchie14:10:13

I hacked up a test profile months ago with lein-doo and I suspect that the testing experience would be way better with shadow-cljs... also I'm finally at a phase where I can start developing UI components off of this work, so it's time to switch. just wanted to make sure I wasn't missing any pieces wrt library


just to understand what you are talking about here. you want to bundle everything up as a regular library that people will add to their :dependencies and require in their ns?


CLJS libs are not compiled at all when doing that. you just include the source files.

Sam Ritchie14:10:51

yes, I didn't know if, for example, there were some other path these days for dependencies, like direct git deps, that needed a shadow-cljs.edn for clojurescript


the only place where someone needs a shadow-cljs.edn is in their project. that is the only relevant one. all others have no effect.

Sam Ritchie14:10:14

👍 thank you!

Sam Ritchie14:10:06

probably what I should do if I want to enable git deps is move this build to tools.edn

Sam Ritchie14:10:11

which is unrelated to shadow, as you say


yes, deps.edn is its own thing.


I'm getting a warning I don't understand:

------ WARNING #1 - :undeclared-var --------------------------------------------
 File: /Users/borkdude/.gitlibs/libs/borkdude/sci/971614de14a6fd00e6991d1afd6c0ce9fbda104c/src/sci/impl/fns.cljc:51:32
  48 |                           (throw-arity fn-name macro? args))
  49 |                         ret)))
  50 |                   ctx #?(:clj (.assoc ctx :bindings bindings)
  51 |                          :cljs (-assoc ctx :bindings bindings))
 Use of undeclared Var sci.impl.fns/clojure


odd indeed. looks like the reported location is incorrect


this can happen if you have any fully-qualified names in CLJC code that ends up in a CLJS branch


eg. clojure.lang.ExceptionInfo or anything clojure.lang.* really


you can maybe look at the generated code looking for clojure. maybe that provides a better clue


I see a few references that would confuse CLJS. eg ^clojure.lang.Associative ctx so thats most likely it


(.get ^java.util.Map ctx :bindings)


aha, thanks!


Hello all, is that possible to use shadow-cljs to compile to typescript?