Fork me on GitHub

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


🎯 3

It might be processing it through 7 dimensions 😝 (based on the number of G’s)


I mean I know how it comes up with those but it is still kinda spooky to see sometimes


you can put a cljs/closure.clj with just (ns cljs.closure) on your classpath


then you can update the closure-compiler version which has the fix


(in theory, haven't tried)

Alexis Vincent18:03:47

Being thrown when Closure hits @stitches/react , required by , 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, :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.}]}


David is working on this currently

Alexis Vincent18:03:14

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?


sure. just open it in the browser. just need to know the IP of your machine.


Perfect thanks man :)

Alexis Vincent19:03:10

Using bump-closure I hit

Syntax error (ClassNotFoundException) compiling at (shadow/build/closure.clj:1:1).
Do you see a quick fix? Or should I wait. Seems like David is pretty active on the branch


need to update shadow-cljs too 🙂


oh nevermind. I haven't released the version with the fix yet.


hang on I can do that now


@mail024 2.11.19 should fix that

Alexis Vincent19:03:48

Shweeeet. Will give it a go

Alexis Vincent19:03:00

The required namespace "goog.result" is not available, it was required by "shadow/xhr.cljs".
might be another removal

Alexis Vincent19:03:36

Against bump-closure


don't bump the closure library for now


closure-compiler is enough

Alexis Vincent19:03:41

Ah, I’m just using David’s branch. Dont really know what you mean by the cljs/closure.clj thing.

Alexis Vincent19:03:35

Do i just add an exclude and drop the dep down

Alexis Vincent19:03:39

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


src/main/cljs/closure.clj or so


then you can stick with older CLJS version or rather the current 1.10.773

Alexis Vincent19:03:31

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

Alexis Vincent19:03:42

maybe i found the wrong one


as I said ... just (ns cljs.closure) nothing else


shadow-cljs does not use that file at all, so it can be empty


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

Alexis Vincent19:03:40

thanks. Will give that a go


but since nrepl is started by default its best to just replace the file temporarily


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


current version should though


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

Alexis Vincent19:03:21

Yeah. With you on that! Just thought i needed to overwrite the file with something useful.

Alexis Vincent19:03:56

Whoop whoop!!! It compiled without errors on the new closure compiler!

Alexis Vincent19:03:10

Thanks @thheller. Appreciate it!