(defn confirm-var-exists
([env prefix suffix]
(let [warn (confirm-var-exist-warning env prefix suffix)]
(confirm-var-exists env prefix suffix warn)))
([env prefix suffix missing-fn]
(let [sufstr (str suffix)
suffix-str (if (and #?(:clj (not= ".." sufstr)
:cljs (not (identical? ".." sufstr))) ;; leave cljs.core$macros/.. alone
#?(:clj (re-find #"\." sufstr)
:cljs ^boolean (.test #"\." sufstr)))
(first (string/split sufstr #"\."))
suffix)
suffix (symbol suffix-str)]
(when (and (not (implicit-import? env prefix suffix))
(not (loaded-js-ns? env prefix))
(not (and (= 'cljs.core prefix) (= 'unquote suffix)))
(nil? (gets @env/*compiler* ::namespaces prefix :defs suffix))
(not (js-module-exists? prefix)))
(missing-fn env prefix suffix)))))