[ClojureScript] Re: muting specific warnings with the cljs compiler

2015-02-04 Thread Francis Avila
You may be hitting CLJS-907 (cf CLJS-917), fixed in 0.0-2629 and later.

On Tuesday, February 3, 2015 at 8:05:04 PM UTC-6, Chris Zheng wrote:
 I'm trying to figure out how to best deal with an issue on the newer versions 
 of the class compiler:
 
 https://github.com/purnam/purnam/issues/8
 
 I've reproduced the issue causing the warning in this particular piece of code
 
 (ns compiler.issue-1
   (:require [purnam.test])
   (:use-macros [purnam.core :only [? !]]))
 
 (set! js/aa #js {})
 (def a js/aa)
 (! a.b.c )
 (+ 2 (? a.b.c) 3)
 
 
 -
 
 Running the compiler with clojurescript 0.0-2411 yields a particular 
 warning:
 
 WARNING: cljs.core/+, all arguments must be numbers, got [number #{nil 
 clj-nil}] instead. at line 9 test/cljs/compiler/issue_1.cljs
 
 the previous versions of clojurescript do not give this warning. I'm hoping 
 to get a bit of help/advice on how to deal with this.
 
 -
 
 you can get the warnings by:
 
 git clone https://github.com/purnam/purnam.git
 cd purnam
 git checkout compilation-error
 lein cljsbuild once
 
 -

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] analysing advanced build output size

2015-02-04 Thread stephanos
Here it is: https://github.com/stephanos/minifyretracer

Stephan

On Tuesday, February 3, 2015 at 10:37:46 PM UTC+1, stephanos wrote:
 Just a quick follow up: I wrote a small Node script to analyse the 
 contribution of each source file that goes into the final artifact. It works 
 by reading the source map and simply counts each character, attributing it to 
 the original source file.
 
 Here is a sample output:
 
 source size %
 out/app/server/core.cljs   0.00 KB  0.00 
 out/app.cljs   0.00 KB  0.00 
 out/plumbing/core.cljs 0.01 KB  0.00 
 out/goog/labs/useragent/browser.js 0.03 KB  0.00 
 out/goog/labs/useragent/engine.js  0.03 KB  0.00 
 out/goog/history/eventtype.js  0.03 KB  0.00 
 out/goog/disposable/disposable.js  0.04 KB  0.01 
 out/goog/dom/browserfeature.js 0.05 KB  0.01 
 out/goog/history/event.js  0.05 KB  0.01 
 out/goog/events/eventtype.js   0.05 KB  0.01 
 out/cljs/nodejs.cljs   0.06 KB  0.01 
 out/com/cognitect/transit/delimiters.js0.09 KB  0.01 
 out/app/server/http.cljs   0.09 KB  0.01 
 out/goog/ui/idgenerator.js 0.09 KB  0.01 
 out/goog/reflect/reflect.js0.09 KB  0.01 
 out/goog/events/listenable.js  0.09 KB  0.01 
 out/goog/labs/useragent/util.js0.10 KB  0.02 
 out/goog/events/browserfeature.js  0.14 KB  0.02 
 out/goog/events/listener.js0.18 KB  0.03 
 out/goog/events/event.js   0.23 KB  0.04 
 out/com/cognitect/transit/impl/reader.js   0.26 KB  0.04 
 out/cljs/core/async/impl/dispatch.cljs 0.28 KB  0.04 
 out/goog/string/stringbuffer.js0.30 KB  0.05 
 out/goog/uri/utils.js  0.30 KB  0.05 
 out/app/utils/db.cljs  0.31 KB  0.05 
 out/com/cognitect/transit.js   0.35 KB  0.06 
 out/app/utils/log.cljs 0.37 KB  0.06 
 out/clojure/walk.cljs  0.43 KB  0.07 
 out/cljs/core/async/impl/timers.cljs   0.44 KB  0.07 
 out/app/core.cljs  0.44 KB  0.07 
 out/goog/object/object.js  0.47 KB  0.07 
 out/goog/structs/structs.js0.49 KB  0.08 
 out/goog/i18n/timezone.js  0.51 KB  0.08 
 out/goog/useragent/useragent.js0.55 KB  0.09 
 out/shodan/console.cljs0.58 KB  0.09 
 out/om/dom.cljs0.67 KB  0.11 
 out/goog/events/listenermap.js 0.76 KB  0.12 
 out/app/browser/core.cljs  0.80 KB  0.13 
 out/app/views/pub/terms.cljs   0.84 KB  0.13 
 out/app/views/pub/about.cljs   0.84 KB  0.13 
 out/app/views/pub/privacy.cljs 0.84 KB  0.13 
 out/app/views/pub/contact.cljs 0.84 KB  0.13 
 out/goog/history/html5history.js   0.84 KB  0.13 
 out/app/views/pub/sign_in.cljs 0.85 KB  0.13 
 out/app/views/navbar.cljs  0.85 KB  0.13 
 out/app/views/pub/imprint.cljs 0.85 KB  0.13 
 out/app/views/pub/register.cljs0.89 KB  0.14 
 out/cljs/core/async/impl/protocols.cljs0.91 KB  0.14 
 out/com/cognitect/transit/caching.js   0.96 KB  0.15 
 out/goog/array/array.js0.96 KB  0.15 
 out/goog/date/utcdatetime.js   0.97 KB  0.15 
 out/goog/i18n/datetimesymbols.js   1.00 KB  0.16 
 out/goog/string/stringformat.js1.01 KB  0.16 
 out/goog/events/eventtarget.js 1.04 KB  0.16 
 out/app/browser/history.cljs   1.05 KB  0.17 
 out/goog/async/nexttick.js 1.17 KB  0.19 
 out/cljs_time/internal/core.cljs   1.19 KB  0.19 
 out/app/views/header.cljs  1.25 KB  0.20 
 out/cljs/core/async/impl/buffers.cljs  1.28 KB  0.20 
 out/goog/string/string.js  1.29 KB  0.21 
 out/app/views/pub/home.cljs1.29 KB  0.21 
 out/com/cognitect/transit/util.js  1.35 KB  0.21 
 out/com/cognitect/transit/eq.js1.37 KB  0.22 
 out/goog/structs/map.js

Re: [ClojureScript] muting specific warnings with the cljs compiler

2015-02-04 Thread Chris Zheng
Oh that’s brilliant!

Though I’m still wondering if there a way to turn off specific warnings (for 
future reference)

Chris

 On 5 Feb 2015, at 5:47 am, Francis Avila fav...@breezeehr.com wrote:
 
 You may be hitting CLJS-907 (cf CLJS-917), fixed in 0.0-2629 and later.
 
 On Tuesday, February 3, 2015 at 8:05:04 PM UTC-6, Chris Zheng wrote:
 I'm trying to figure out how to best deal with an issue on the newer 
 versions of the class compiler:
 
 https://github.com/purnam/purnam/issues/8
 
 I've reproduced the issue causing the warning in this particular piece of 
 code
 
 (ns compiler.issue-1
  (:require [purnam.test])
  (:use-macros [purnam.core :only [? !]]))
 
 (set! js/aa #js {})
 (def a js/aa)
 (! a.b.c )
 (+ 2 (? a.b.c) 3)
 
 
 -
 
 Running the compiler with clojurescript 0.0-2411 yields a particular 
 warning:
 
 WARNING: cljs.core/+, all arguments must be numbers, got [number #{nil 
 clj-nil}] instead. at line 9 test/cljs/compiler/issue_1.cljs
 
 the previous versions of clojurescript do not give this warning. I'm hoping 
 to get a bit of help/advice on how to deal with this.
 
 -
 
 you can get the warnings by:
 
 git clone https://github.com/purnam/purnam.git
 cd purnam
 git checkout compilation-error
 lein cljsbuild once
 
 -
 
 -- 
 Note that posts from new members are moderated - please be patient with your 
 first post.
 --- 
 You received this message because you are subscribed to a topic in the Google 
 Groups ClojureScript group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojurescript/2ue-RvKXCSM/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescript@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
ClojureScript group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.