This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-01
Channels
- # announcements (26)
- # babashka (58)
- # bangalore-clj (1)
- # beginners (48)
- # bitcoin (1)
- # chlorine-clover (9)
- # clara (7)
- # clj-kondo (11)
- # cljs-dev (10)
- # cljsrn (36)
- # clojars (11)
- # clojure (161)
- # clojure-europe (39)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-uk (14)
- # clojured (1)
- # clojurescript (38)
- # conjure (25)
- # core-async (18)
- # cursive (19)
- # datascript (9)
- # datomic (11)
- # emacs (10)
- # events (2)
- # figwheel-main (2)
- # fulcro (44)
- # funcool (5)
- # girouette (1)
- # graalvm (6)
- # jobs (1)
- # lsp (93)
- # malli (3)
- # membrane (3)
- # off-topic (17)
- # pedestal (2)
- # polylith (12)
- # re-frame (2)
- # remote-jobs (1)
- # shadow-cljs (47)
- # specter (2)
- # startup-in-a-month (1)
- # tools-deps (4)
sometimes you really have to wonder what the closure-compiler is doing to the code when this is the "best" pseudo-name it can come up with for a local variable is
$G__37663_G__37667_G__37671_G__37675_G__37682_G__37686_G__37691_anchor_37656_old_coll_37645_old_items_37652$
$G__37664_G__37668_G__37672_G__37676_G__37683_G__37687_G__37692_idx_37657_new_len_37651$$
I mean I know how it comes up with those but it is still kinda spooky to see sometimes
@thheller Is there an application level fix I can apply to get around -> https://github.com/thheller/shadow-cljs/issues/846#issuecomment-788183542
maybe this branch of CLJS also works https://github.com/clojure/clojurescript/tree/bump-closure
Being thrown when Closure hits @stitches/react
, required by https://github.com/pmndrs/leva , I’ve tried setting
{:js-options {:resolve {"@stitches/react" {:target :npm
:require "@stitches/react/dist/stitches.react.esm.mjs"}}}})
but that doesnt seem to actually change the file being resolved
as can be seen
#error {
:cause closure errors
:data {:tag :shadow.build.closure/errors, :errors [{:resource-name node_modules/@stitches/react/dist/stitches.react.cjs.cjs, :source-name node_modules/@stitches/react/dist/stitches.react.cjs.cjs, :line 2, :column 1218, :msg Class names defined inside a function cannot be reassigned.} {:resource-name node_modules/@stitches/react/dist/stitches.react.cjs.cjs, :source-name node_modules/@stitches/react/dist/stitches.react.cjs.cjs, :line 2, :column 1229, :msg Class names defined inside a function cannot be reassigned.} {:resource-name node_modules/@stitches/react/dist/stitches.react.cjs.cjs, :source-name node_modules/@stitches/react/dist/stitches.react.cjs.cjs, :line 2, :column 4095, :msg Class names defined inside a function cannot be reassigned.}]}
Thanks. Will see what I can get right
Is it possible to view shadow cljs React App on a Mobile Device that is connected to same network?
Using bump-closure
I hit
Syntax error (ClassNotFoundException) compiling at (shadow/build/closure.clj:1:1).
com.google.javascript.jscomp.AnonymousFunctionNamingPolicy
Do you see a quick fix? Or should I wait. Seems like David is pretty active on the branchShweeeet. Will give it a go
The required namespace "goog.result" is not available, it was required by "shadow/xhr.cljs".
might be another removalAgainst bump-closure
Ah, I’m just using David’s branch. Dont really know what you mean by the cljs/closure.clj
thing.
Do i just add an exclude and drop the dep down
org.clojure/google-closure-library {:mvn/version "0.0-20201211-3e6c510d"}
you put the file on the classpath. meaning you take one of your source-paths and put the file there
No i get that. But im not sure what to put inside. When i found the file in the clojurescript repo it looked very long
maybe i found the wrong one
Oh right.
it is nrepl piggieback loading that file so if you don't need that then you don't need to worry about that at all either
thanks. Will give that a go
oh and it might matter which tools.deps version you use too. since older versions didn't put source-paths first this trick might not work there
basically by putting it one the :paths
(or :source-paths
if just shadow-cljs.edn
) you are "overwriting" the file in the clojurescript released jar
Yeah. With you on that! Just thought i needed to overwrite the file with something useful.
Thanks!
Whoop whoop!!! It compiled without errors on the new closure compiler!
Thanks @thheller. Appreciate it!