This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-18
Channels
- # announcements (35)
- # babashka (14)
- # beginners (23)
- # calva (5)
- # cljsrn (3)
- # clojure (154)
- # clojure-europe (12)
- # clojure-losangeles (2)
- # clojure-uk (5)
- # clojurescript (42)
- # conjure (3)
- # cursive (10)
- # datomic (3)
- # emacs (6)
- # events (1)
- # graalvm (1)
- # helix (1)
- # honeysql (1)
- # hyperfiddle (1)
- # jobs-discuss (1)
- # lsp (8)
- # malli (54)
- # meander (1)
- # membrane (1)
- # off-topic (246)
- # polylith (4)
- # practicalli (1)
- # re-frame (14)
- # releases (1)
- # shadow-cljs (21)
- # sql (58)
- # vim (1)
- # vrac (2)
Looking in shadow-cljs.edn here https://github.com/PEZ/rn-rf-shadow 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.
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
:rolling_on_the_floor_laughing: I definitely checked if that comment was from you or @U05224H0W!
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
dynadoc.core
[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 https://github.com/oakes/paren-soup/blob/15f55ebb40ee30f75ca960d381ddebd094a76f3d/src/paren_soup/core.cljs#L6
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: https://github.com/oakes/dynadoc-examples/tree/master/basic-deps-cljs
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 https://github.com/oakes/dynadoc-examples/blob/b23ef1003365d238847d1f1ea3f6d73149ae0bac/basic-deps-cljs/src/basic_deps_cljs/docs.cljs#L4) 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.short version: shadow-cljs does not support CLJSJS packages so it won't work with anything using those
but usually its pretty easy fix https://shadow-cljs.github.io/docs/UsersGuide.html#cljsjs
longer version https://code.thheller.com/blog/shadow-cljs/2017/09/15/js-dependencies-the-problem.html
https://code.thheller.com/blog/shadow-cljs/2017/09/15/js-dependencies-going-forward.html
https://code.thheller.com/blog/shadow-cljs/2017/11/10/js-dependencies-in-practice.html
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@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 https://shadow-cljs.github.io/docs/UsersGuide.html#cljsjs You can read about it here: https://code.thheller.com/blog/shadow-cljs/2017/09/15/js-dependencies-the-problem.html 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