Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing is<Browser> methods with recent versions of ClojureScript #97

Open
paulbutcher opened this issue Jan 4, 2022 · 0 comments
Open

Comments

@paulbutcher
Copy link

I'm getting a number of warnings about missing is<Browser> methods when compiling with recent versions of ClojureScript (it seems to have been introduced by version 1.10.896):

[Figwheel:WARNING] Compile Warning   resources/public/cljs-out/dirac/runtime/util.cljs   line:32  column:22

  Use of undeclared Var goog.labs.userAgent.browser/isOpera

  27  
  28  (defn platform-str [name name-placeholder version version-placeholder]
  29    (str (str-or-placeholder name name-placeholder) "/" (str-or-placeholder version version-placeholder)))
  30  
  31  (defn get-browser-version-info []
  32    (let [browser-name (get-current-browser-name)
                           ^---
  33          browser-version (ua-browser/getVersion)]
  34      (platform-str browser-name "?" browser-version "?")))
  35  
  36  (defn get-browser-platform-info []
  37    (let [platform-name (get-current-platform-name)

[Figwheel:WARNING] Compile Warning   resources/public/cljs-out/dirac/runtime/util.cljs   line:32  column:22

  Use of undeclared Var goog.labs.userAgent.browser/isIE

  27  
  28  (defn platform-str [name name-placeholder version version-placeholder]
  29    (str (str-or-placeholder name name-placeholder) "/" (str-or-placeholder version version-placeholder)))
  30  
  31  (defn get-browser-version-info []
  32    (let [browser-name (get-current-browser-name)
                           ^---
  33          browser-version (ua-browser/getVersion)]
  34      (platform-str browser-name "?" browser-version "?")))
  35  
  36  (defn get-browser-platform-info []
  37    (let [platform-name (get-current-platform-name)

[Figwheel:WARNING] Compile Warning   resources/public/cljs-out/dirac/runtime/util.cljs   line:32  column:22

  Use of undeclared Var goog.labs.userAgent.browser/isEdge

  27  
  28  (defn platform-str [name name-placeholder version version-placeholder]
  29    (str (str-or-placeholder name name-placeholder) "/" (str-or-placeholder version version-placeholder)))
  30  
  31  (defn get-browser-version-info []
  32    (let [browser-name (get-current-browser-name)
                           ^---
  33          browser-version (ua-browser/getVersion)]
  34      (platform-str browser-name "?" browser-version "?")))
  35  
  36  (defn get-browser-platform-info []
  37    (let [platform-name (get-current-platform-name)

[Figwheel:WARNING] Compile Warning: Use of undeclared Var goog.labs.userAgent.browser/isFirefox  resources/public/cljs-out/dirac/runtime/util.cljs   line:32  column:22
[Figwheel:WARNING] Compile Warning: Use of undeclared Var goog.labs.userAgent.browser/isSafari  resources/public/cljs-out/dirac/runtime/util.cljs   line:32  column:22
[Figwheel:WARNING] Compile Warning: Use of undeclared Var goog.labs.userAgent.browser/isCoast  resources/public/cljs-out/dirac/runtime/util.cljs   line:32  column:22
[Figwheel:WARNING] Compile Warning: Use of undeclared Var goog.labs.userAgent.browser/isChrome  resources/public/cljs-out/dirac/runtime/util.cljs   line:32  column:22
[Figwheel:WARNING] Compile Warning: Use of undeclared Var goog.labs.userAgent.browser/isChrome  resources/public/cljs-out/dirac/runtime/repl.cljs   line:23  column:13
[Figwheel:WARNING] Compile Warning: Use of undeclared Var goog.labs.userAgent.browser/isChrome  resources/public/cljs-out/devtools/async.cljs   line:13  column:14
[Figwheel:WARNING] Compile Warning: Use of undeclared Var goog.labs.userAgent.browser/isChrome  resources/public/cljs-out/devtools/formatters.cljs   line:17  column:13

It looks like these methods have been removed from Google Closure Library. As far as I can see get-current-browser-name is only used within the various different transit.json files, and as I'm unfamiliar with what these do within Dirac, I'm not sure what the right fix might be?

darwin added a commit to binaryage/cljs-devtools that referenced this issue Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant