   (let [meth (doto (.getDeclaredMethod URLClassLoader "addURL" (into-array Class [URL]))
                (.setAccessible true))]
     (.invoke meth (ClassLoader/getSystemClassLoader)
-             (into-array Object (map #(.. (io/file %) toURI toURL) dirs)))
+             (object-array (map #(.. (io/file %) toURI toURL) dirs)))
     (swap! env update-in [:directories] into dirs)))
 
 (defn version [string]


(defn install [{:keys [coordinates repositories]}]
  (let [deps (pom/add-dependencies
              :coordinates (mapv exclude-clojure coordinates)
              :repositories (merge *default-repositories* repositories))]
    (swap! env update-in [:dependencies] merge deps)))


(defn find-idx [v val]
  (ffirst (filter (comp #{val} second) (map vector (range) v))))

(defn exclude [syms coordinate]
  (if-let [idx (find-idx coordinate :exclusions)]
    (let [exclusions (core/get coordinate (inc idx))]
      (assoc coordinate (inc idx) (into exclusions syms)))
    (into coordinate [:exclusions syms])))

(def env
  (atom {:dependencies {} :directories #{}, :boot-version nil}))
