Missing is<Browser> methods with recent versions of ClojureScript
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from binaryage/dirac
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
clojure-emacs/cider#4203 ·
-
.Team/QueryingPlatform Priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
clj-commons/antq#329 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100