bhauman / figwheel-repl

Figwheel REPL provides a stable multiplexing REPL for ClojureScript
45 stars 11 forks source link

Latest CLJS Version: Compiler Warning #10

Closed athomasoriginal closed 4 years ago

athomasoriginal commented 4 years ago

Hi Bruce!

I was testing the latest version of the CLJS compiler on one of my figwheel projects and noticed the following compiler warning in being thrown:

[Figwheel:WARNING] Compile Warning   target/public/cljs-out/dev/figwheel/repl.cljc   line:607  column:6

  Use of undeclared Var goog.log/warn

  602  (defn set-log-level [logger' level]
  603    (if-let [lvl (get log-levels level)]
  604      (do
  605        (.setLevel logger' lvl)
  606        (debug (str "setting log level to " level)))
  607      (glog/warn (str "Log level " (pr-str level) " doesn't exist must be one of "
            ^---
  608                      (pr-str '("severe" "warning" "info" "config" "fine" "finer" "finest"))))))
  609
  610  (defn init-log-level! []
  611    (doseq [logger' (cond-> [logger]
  612                      (exists? js/figwheel.core)

I believe it's caused by this line https://github.com/bhauman/figwheel-repl/blob/master/src/figwheel/repl.cljc#L610 which seems to make sense because I don't believe there is a warn class in goog.log

The version of CLJS I am running:

{org.clojure/clojurescript {:git/url "https://github.com/clojure/clojurescript.git"
                                              :sha     "82ab13febad04d641fb86204d785395105399046"}}}}}

I am happy to make a PR to resolve this issue if needed. I just want to run this by you before I do anything.

kommen commented 4 years ago

The problem is, that there is no glog/warn. glog/warning would be correct: https://github.com/google/closure-library/blob/e754d4a19bfd9332ba5dc8b62687500655f2d8b9/closure/goog/log/log.js#L161 and is used here already: https://github.com/bhauman/figwheel-repl/blob/cab3cbb5df6060caf0a04364f93a0ba3f151cf80/src/figwheel/repl.cljc#L586