day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
631 stars 68 forks source link

[Bug]: goog.ui usage incompatible with shadow-cljs 2.22.0 and google-closure-library v20230227 #382

Closed scarytom closed 1 year ago

scarytom commented 1 year ago

What happened?

Getting an error in the browser console when loading my app locally (shadow-cljs watch) since upgrading from shadow-cljs 2.21.0 -> 2.22.0

The error does not occur if I remove the day8.re-frame-10x.preload preload.

This version bump of shadow-cljs comes with a massive bump in the underlying google closure library version (from v20211011 to v20230227) so I strongly suspect that some of the changes to goog.ui between those two versions are causing the issue.

This was discussed in the Clojurian's slack

10x Version

1.5.0

Reagent Version

1.2.0

React Version

17.0.2

re-frame Version

1.3.0

What browsers are you seeing the problem on?

Chrome

Relevant console output

TypeError: Cannot read properties of undefined (reading 'setDecoratorByClassName')
    at eval (control.js:106:54)
    at eval (<anonymous>)
    at goog.globalEval (app.js:430:11)
    at env.evalLoad (app.js:1387:12)
    at app.js:1656:12
thheller commented 1 year ago

I identified the issue https://github.com/thheller/shadow-cljs/issues/1097.

re-frame-10x isn't doing anything wrong, shadow-cljs is just confused. Will think about it for a bit, and should have a fix this weekend.

thheller commented 1 year ago

Should be fixed in 2.22.1.

rome-user commented 1 year ago

Assuming everything works on the latest shadow-cljs, I think this issue can be closed

scarytom commented 1 year ago

I've re-tested, and it all works for me.