Fork me on GitHub

Looking in shadow-cljs.edn here we see the comment: "; In a real app consider using deps.edn instead." Is there something we should know, @pez? Some deficit in shadow-cljs? Performance, build quality, app size? Thx! 🙏


Iirc, that comment originates from @U05224H0W


I don't think it is either of those reasons, though. Rather functionality. deps.edn is a purpose built dependency management tool. Shadow can take care of some of that for you, but I think it is a non-goal to make that pay full featured.


It's easy enough to just move it out to deps.edn if you outgrow what shadow offers.


that comment definitely did not come from me 😛


if you ever need git dependencies or the :local/root stuff then it makes sense to use deps.edn


otherwise they are pretty similar. you definitely don't gain any performance, build quality or app size advantages from using deps.edn. none of the is affected by which tool you use to build the classpath


Note to self: I should remove that file.


:rolling_on_the_floor_laughing: I definitely checked if that comment was from you or @U05224H0W!

Drew Verlee16:07:15

greetings, i'm asking this question the problem with the library might be understood best through the differences between shadow and figwheel. the expression (shadow.cljs.devtools.api/compile :docs {:verbose true) with the shadow build :modules {:main {:entries [doc] and that entrie/ns being

(ns docs
  (:require [ :as app]
            ;; must require dynadoc.core so dynadoc's frontend can be built
            [rum.core :as rum])
  (:require-macros [dynadoc.example :refer [defexample]]))
Return's the error The required namespace "cljsjs.rangy-core" is not available, it was required by "paren_soup/core.cljs". If i look at the namespace paren_soup/core.cljs it does require it right here but i'm unsure why it would "not available". Any advice on how to troubleshoot this would be appreciated. Things to i have noticed: • the author's minimal example of how to use the overall functionality used figwheel here: uses fighwheel with compiler optimizations set to :simple, which i have also enabled. • if i remove the require on the dynadoc.core library in the cljs ns (e.g then it will compile, but the examples don't properly eval (e.g (defexample conj (conj [] 1)) doest show the expression result [1]. So i assume the comment on the code for the dyadoc.core require is still relevent. "must require dynadoc.core so dynadocs frontend can be built". My intuition is that maybe shadow is pruning out cljsjs.rangy-core because it's never directly used? but overall, I'm really unsure where to look.

👍 3

short version: shadow-cljs does not support CLJSJS packages so it won't work with anything using those


I’m seeing a dependency shadow watch says wasn’t installed:

[:app] Configuring build.
[:app] Compiling ...
[:app] Build failure:
The required JS dependency "querystring" is not available, it was required by "node_modules/url/url.js".
even after installing with npm

Drew Verlee23:07:30

@U01F1TM2FD5 i'm not sure, but this looks very similar to my problem in essence. It's possible the issue is because shadow-cljs does not support CLJSJS packages so it won't work with anything using those. but usually its  pretty easy fix You can read about it here: I'm not sure that's the heart of the issue but worth checking


@U0DJ4T5U1 this is a npm package, not a CLJSJS package


@U01F1TM2FD5 you need to have shadow-cljs installed in the project, so npm install shadow-cljs


that'll install the node-libs-browser polyfills package which polyfills node built-in packages for the browser