Fork me on GitHub
#shadow-cljs
<
2024-04-13
>
David Yang02:04:10

hey all - I’m trying to compile from the API (so that I can do a single jack-in using Calva) but if my user ns requires taoensso.timbre, then shadow-cljs throws an error trying to compile taoensso.encore. If I use the same aliases but don’t include the (ns user) from the alias then shadow can compile. It looks like it stems from this line in encore https://github.com/taoensso/encore/blob/bbfa1a022e529109933aa168ce2d2e983bf0b38e/src/taoensso/encore.cljc#L1112

(when-let [ns (find-ns 'cljs.analyzer.api)
                    v  (ns-resolve ns 'resolve)]
where @v returns nil instead of a function.

thheller07:04:50

sorry I don't really understand the problem. please explain more what you are doing and less what you think the problem is 😛

thheller07:04:08

compile from which API?

thheller10:04:08

ah that clarifies things

thheller10:04:53

@UASETR481 FWIW shadow.cljs.devtools.api is basically the same as calling things from the command line, just from the clojure REPL. so shadow-cljs watch app becomes (shadow.cljs.devtools.api/watch :app)

🙏 1
👍 1
thheller10:04:54

same for all the other available cli commands. all have an identical clojure fn to call.

Peter Taoussanis10:04:42

Thanks Thomas! And thank you for all the hard work on shadow-cljs, I just recently had the opportunity to start using it - and it’s an amazing tool. Much appreciated! Cheers :-)

❤️ 1