Last active
December 23, 2015 22:37
-
-
Save tolitius/be91fba7c292f05705bb to your computer and use it in GitHub Desktop.
boot & lein '[[dependencies]]: stripping aot classifiers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; useful for test / dev tasks | |
(defn dep-to-attrs [dep] | |
(into {} (map vec (partition 2 dep)))) | |
(defn attrs-to-dep [attrs] | |
(->> attrs | |
(apply vector) | |
(apply concat) | |
vec)) | |
(defn strip-aot [dep] | |
(let [{:keys [classifier] :as attrs} (dep-to-attrs dep)] | |
(attrs-to-dep (if (= "aot" classifier) | |
(dissoc attrs :classifier) | |
attrs)))) | |
;; in dev/test tasks: | |
(deftask xyz [] | |
(set-env! :dependencies #(mapv strip-aot %)) | |
;; .. | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment