I have a React Native project with figwheel-main. Bumped ClojureScript to this :sha 715cdc07dbb1d595af91ea12affb6faf0b615d4b I get the following warnings during compilation: https://gist.github.com/raspasov/7e3bdf03d60af47e71a9bc738fb8382e After that, the app launches, but the REPL does not connect.
Also, once the app launches you get the following error (screenshot attached) which I believe is connected to the warnings during compilation (but you can dismiss the error and the app works, but still no REPL connection): https://gist.github.com/raspasov/7e3bdf03d60af47e71a9bc738fb8382e#gistcomment-3654498
Did some of the goog.log functions introduce breakage?
the closure-library changed a lot of stuff regarding goog.log
. so figwheel seems to use some stuff that they changed and broke
Yeah, it seems they used to take 2 args, but now they don’t.
“Compile Warning: Wrong number of args (2) passed to goog.log/error” etc, etc and other functions
nah that wouldn't cause breakage, just the warnings
the runtime stuff is calling code that was removed, that is the real issue
The code isn't removed. For some reason the line in question is using a ' at the end of the var, which I've never seen before. https://github.com/bhauman/figwheel-repl/blob/43f3e0dcb11e95f85800d81f795f32d5cc8a38a4/src/figwheel/repl.cljc#L618
Oh, I see. They changed how it works. So it should be (glog/setLevel logger' lvl)
logger'
is just a normal CLJS variable name. nothing special regarding that, just looks a bit odd.
Was told that in the other thread. I've never used it so it was just confusing to see. I resolved the actual issue with the above change.
:figwheel {:extra-deps {com.bhauman/figwheel-core {:git/url "<https://github.com/MikeJCusack/figwheel-core>"
:sha "fb1aa3ea465e1b34aaa0b07065b7b0bca2c931c5"}
com.bhauman/figwheel-main {:git/url "<https://github.com/MikeJCusack/figwheel-main>"
:sha "9be32e51c72cab21a71b643c350474eec3b55a72"}
com.bhauman/figwheel-repl {:git/url "<https://github.com/MikeJCusack/figwheel-repl>"
:sha "b155e7631501f90921cf2a7505055fe2c937214c"}}}
I guess that causes the REPL not to connect?
you can just downgrade the closure-library version used. that should make it work again.
yeah some of the code seems to cause an exception and if that happens during the code load the later code is not executed
so I guess it never gets to the REPL connect part
@thheller thanks, do you know how I can downgrade easily google closure while staying at the latest :sha ? Via deps.edn or package.json ?
just add a direct dependency in deps.edn to the previous version
Thanks 🙂
Seems like shadow requires a certain version of cljs, how do I test cljs with git deps in a project using shadow?
it doesn't require a specific version in general but certain combinations of shadow-cljs/CLJS/closure-compiler/closure-library have issues
current master shadow-cljs + CLJS master + latest closure-compiler/library work
git deps you can't do with pure shadow-cljs.edn
. deps.edn
works as usual, nothing special there.
Downgrading to: org.clojure/google-closure-library {:mvn/version “0.0-20191016-6ae1f72f”} … fixes it.
while staying at:
org.clojure/clojurescript {:git/url "<https://github.com/clojure/clojurescript>" :sha "715cdc07dbb1d595af91ea12affb6faf0b615d4b"}
I also hit some bumps trying to get the latest ClojureScript work with our React Native project - and yes most of the issues seem Closure Library related. Would like to work through the issues so we can offer some guidance in the release notes.
Over here they seemed related to the Metro not liking some patterns in ES6 Closure libs
@dnolen under :advanced or under dev builds ?
(I haven’t tried :advanced with the new ClojureScript + React Native/metro … )
Looks like a few Canary projects broke (I haven't looked deeply yet) https://github.com/cljs-oss/canary
initial results from Nextjournal: apart from having to fix our logging library due Closure Library changes related to logging, all seems good
cljs-oss/canary is such a good idea. Didn’t realize it existed 🙂
these are the the preliminary changes, still have to work through the docs as there are more apis deprecated now it seems https://github.com/nextjournal/glogi/commit/d17e48da78f2ae24938104b7ee2567023b9bc007
FWIW, my React Native projected built successfully with :advanced with the new ClojureScript + downgraded google-closure (it’s a fairly small project with not too many deps.edn dependencies at the moment)
@raspasov dev builds
@kommen ok good, we'll add this to the release notes - if people list the other apis that changed that would be useful
@raspasov that's good to know, that it can work for you
@mfikes that's actually better than I expected
bumped Closure again - no problems this time
I'm looking at canary fulcro issues:
WARNING: Use of undeclared Var goog.math.Long/fromBits at line 64 resources/private/js/unit-tests/clojure/test/check/random/longs.cljs
This look like a clojure.test issue, right?
clojure.test.check actually
Here a list:
;; clojure.test
"goog.math.Long/fromBits clojure/test/check/random/longs.cljs:64"
"goog.math.Long/fromNumber clojure/test/check/random/longs.cljs:81"
"goog.math.Long/fromNumber clojure/test/check/random/longs.cljs:87"
"goog.math.Long/fromString clojure/test/check/random/longs.cljs:77"
"goog.math.Long/getOne clojure/test/check/random/longs.cljs:92"
gotta say - adding the goog fn parsing was a good idea 😛
@mfikes Do you remember what was the problem with Reagent tests on Canary? Maybe due to switch to CircleCI from Travis? https://github.com/cljs-oss/canary/commit/16de8e6fb1eb1a32b5ec364dbaad2fd1b2d80676
@dnolen @mfikes btw, I just released a new version of data.json (1.1.0). has one small bug fix but also updates some of the build infrastructure stuff and defaults to clojure 1.8 dep now, but perhaps of importance to you I enabled direct linking on the aot compiled classifier version you use. It's a bit smaller (81k->75k) and should presumably be slightly faster too.
ok cool