muting specific warnings with the cljs compiler

68 views
Skip to first unread message

Chris Zheng

unread,
Feb 3, 2015, 9:05:04 PM2/3/15
to clojur...@googlegroups.com
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 5555)
(+ 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

-----

Francis Avila

unread,
Feb 4, 2015, 1:47:46 PM2/4/15
to clojur...@googlegroups.com
You may be hitting CLJS-907 (cf CLJS-917), fixed in 0.0-2629 and later.

Chris Zheng

unread,
Feb 4, 2015, 3:28:31 PM2/4/15
to clojur...@googlegroups.com
Oh that’s brilliant!

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

Chris
> --
> 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 clojurescrip...@googlegroups.com.
> To post to this group, send email to clojur...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

David Nolen

unread,
Feb 4, 2015, 3:43:44 PM2/4/15
to clojur...@googlegroups.com

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 clojurescrip...@googlegroups.com.

Chris Zheng

unread,
Feb 4, 2015, 3:58:24 PM2/4/15
to clojur...@googlegroups.com
Oh thats nice. Thanks!
Reply all
Reply to author
Forward
0 new messages