This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-17
Channels
- # admin-announcements (4)
- # aws (26)
- # beginners (88)
- # boot (132)
- # cljs-dev (4)
- # cljsrn (35)
- # clojars (11)
- # clojure (41)
- # clojure-art (33)
- # clojure-austin (1)
- # clojure-chicago (4)
- # clojure-dev (3)
- # clojure-russia (2)
- # clojured (3)
- # clojurescript (9)
- # community-development (19)
- # datomic (34)
- # devcards (2)
- # editors-rus (4)
- # hoplon (29)
- # leiningen (4)
- # music (2)
- # off-topic (21)
- # om (69)
- # other-lisps (1)
- # perun (6)
- # re-frame (1)
- # reagent (9)
- # spacemacs (3)
- # yada (13)
Experiment to have analyzer emit diagnostic in the case where you invoke a literal that is represented as a JavaScript primitive (and thus cannot support IFn
):
cljs.user=> (when false
#_=> (if true
#_=> (1 2)
#_=> ("a" 1)))
WARNING: Cannot invoke value 1 as function at line 3
WARNING: Cannot invoke value "a" as function at line 4
Wondering if something like this would be considered useful. The only overhead is at analysis time (not runtime).
Here’s what I’m thinking https://github.com/mfikes/clojurescript/commit/c6cf2738e3e2fb507e12ba57a8ae50a52b415211I can’t measure any slowdown when running script/test
and it analyzes src/main/cljs/cljs/core.cljs
with the above change.
Hello folks! (and sorry for repetition)
There is issue with encodings and goog.LOCALE
. Simple repro requires :closure-defines {"goog.LOCALE" "ru"}
option, then
(import '[goog.i18n DateTimeFormat])
(let [fmt (DateTimeFormat. "dd MMMM")]
(.format fmt (js/Date.)))
;=> "17 ÑнварÑ"
Closure Compiler source code contains note about this behaviour:
https://github.com/google/closure-compiler/blob/62ca536d0a184a8852646e2bc2db178f700f5cfc/src/com/google/javascript/jscomp/AbstractCommandLineRunner.java#L163
With usage of (.setOutputCharset compiler-options "UTF-8”)
in cljs.closure
the code above compiled fine.@s_zharinov: file an issue in JIRA thanks