(defn parse-import-spec [env deps spec]
(when-not (or (and (sequential? spec)
(every? symbol? spec))
(and (symbol? spec) (nil? (namespace spec))))
(throw (error env (parse-ns-error-msg spec "Only lib.ns.Ctor or [lib.ns Ctor*] spec supported in :import"))))
(let [import-map (if (sequential? spec)
(->> (rest spec)
(map #(vector % (symbol (str (first spec) "." %))))
(into {}))
{(symbol (last (string/split (str spec) #"\."))) spec})]
(doseq [[_ spec] import-map]
(swap! deps conj spec))
{:import import-map
:require import-map}))