advise cljs compiler not to warn about undeclared var instead of the hack that was being used before
This commit is contained in:
parent
637f7fc819
commit
d162c2b49f
2 changed files with 6 additions and 6 deletions
|
|
@ -12,6 +12,7 @@
|
|||
[clojure.string :as s]
|
||||
#+clj [com.rpl.specter.defhelpers :as dh]
|
||||
#+clj [riddley.walk :as riddley]
|
||||
;; #+cljs [cljs.js :as cljs]
|
||||
)
|
||||
#+clj
|
||||
(:import [com.rpl.specter Util])
|
||||
|
|
|
|||
|
|
@ -445,15 +445,16 @@
|
|||
;; to invoke and/or parameterize the precompiled path without
|
||||
;; a bunch of checks beforehand
|
||||
cache-id (if (= platform :clj) (i/gen-uuid-str))
|
||||
cache-sym (gensym "pathcache") ;; used for cljs
|
||||
cache-sym (if (= platform :cljs)
|
||||
(vary-meta
|
||||
(gensym "pathcache")
|
||||
assoc :cljs.analyzer/no-resolve true))
|
||||
|
||||
;; this is used to avoid warnings in cljs code about undeclared var
|
||||
cache-qualified-sym (symbol (str *ns* "." cache-sym))
|
||||
info-sym (gensym "info")
|
||||
|
||||
get-cache-code (if (= platform :clj)
|
||||
`(i/get-path-cache ~cache-id)
|
||||
cache-qualified-sym
|
||||
cache-sym
|
||||
)
|
||||
add-cache-code (if (= platform :clj)
|
||||
`(i/add-path-cache! ~cache-id ~info-sym)
|
||||
|
|
@ -480,8 +481,6 @@
|
|||
~prepared-path
|
||||
~(str *ns*)
|
||||
(quote ~used-locals)
|
||||
;;possible-params is wrong atm
|
||||
;;as is used-locals in cljs...
|
||||
(quote ~possible-params)
|
||||
)]
|
||||
~add-cache-code
|
||||
|
|
|
|||
Loading…
Reference in a new issue