Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Missing is<Browser> methods with recent versions of ClojureScript

Open
#97 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
clojure, javascript, json
Domain
devtools

Research direction

Start by inspecting resources/public/cljs-out/dirac/runtime/util.cljs, especially get-current-browser-name and the ua-browser/getVersion call, then check the related references in runtime/repl.cljs, devtools/async.cljs, and devtools/formatters.cljs. Review the transit.json files to understand how the browser name is used. Done means compiling with recent ClojureScript no longer reports undeclared goog.labs.userAgent.browser/is warnings.

Written by the indexing model from the issue text.

Description

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?

Dominant language
Clojure
Stars
775
Forks
29
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from binaryage/dirac

All issues in binaryage/dirac

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.