Just wanted to report here that if you test out the current CLJS master it has goog.log changes, which break Figwheel Main. At the beginning it's complaining about the wrong number of arguments passed. It successfully compiled my app, including with the new npm require syntax, but when trying to recompile for hot load it hangs. And the behavior is the same without the new syntax.
Yes… relevant discussion here https://clojurians.slack.com/archives/C07UQ678E/p1614931049047500
Well that's not a fix at all since the sole purpose of the new commit is to upgrade Closure. I forked the Figwheel repos and am messing with it. So far I have the log function calls fixed and now on the logger.setLevel error. I'm confused because the code is using ' at the end of vars and I've never seen that before (only single quote at the front).
https://github.com/bhauman/figwheel-repl/blob/43f3e0dcb11e95f85800d81f795f32d5cc8a38a4/src/figwheel/repl.cljc#L618 is the line in question
@mike.j.cusack single quote at the end usually is just part of the var name
I typically use it/read it like “some var PRIME” (it’s some math notation thing, I believe)
I'm confused because if you type foo'
in a repl it fails
Usually means that there’s some previous version of that var, typically called just “logger”, that was modified by the application of a function
(let [y 1.223
y' (int y)]
y')
In this case it’s just the logger’ local, nothing special about it
Oh, ok. Never seen that before
But in any case, the issue is they changed it. https://github.com/google/closure-library/blob/54b59276d091d411556ce845dda9d1a4947f1e4d/closure/goog/log/log.js#L891
Notice that init-log-level! “builds” logger and “transforms” it into logger’
So should be (glog/setLevel logger' lvl)
Yes…
I fixed them
: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"}}}
Very nice.
Now, I set the exception to nil when figwheel wasn't working with an exception. I'm not sure if that's how Bruce would want it. But this works.
Are you going to submit PRs for those fixes @mike.j.cusack?
Or are you waiting to discuss with @bhauman first?
Yeah, I was just waiting for him to chat before submitting.
(just curious since I'm "away" from cljs again right now but planning to come back and will be using Figwheel Main so this is something that would have completely confused me)
Glad to have jumped on it then. I was hoping it would be helpful. 🙂
Gotta love upstream making a breaking change 😄
SemVer is broken, remember 🙂
figwheel-core: https://github.com/MikeJCusack/figwheel-core/commit/fb1aa3ea465e1b34aaa0b07065b7b0bca2c931c5 figwheel-main: https://github.com/MikeJCusack/figwheel-main/commit/9be32e51c72cab21a71b643c350474eec3b55a72 figwheel-repl: https://github.com/MikeJCusack/figwheel-repl/commit/a8cda904a41953cb5101dfdcdb917ea33a8b8afc & https://github.com/MikeJCusack/figwheel-repl/commit/b155e7631501f90921cf2a7505055fe2c937214c