summaryrefslogtreecommitdiff
path: root/srv/src/http/static/viz/2/quil/middlewares/deprecated_options.cljc
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-09-13 12:56:08 +0200
committerBrian Picciano <mediocregopher@gmail.com>2022-09-13 12:56:08 +0200
commit4f01edb9230f58ff84b0dd892c931ec8ac9aad55 (patch)
tree9c1598a3f98203913ac2548883c02a81deb33dc7 /srv/src/http/static/viz/2/quil/middlewares/deprecated_options.cljc
parent5485984e05aebde22819adebfbd5ad51475a6c21 (diff)
move src out of srv, clean up default.nix and Makefile
Diffstat (limited to 'srv/src/http/static/viz/2/quil/middlewares/deprecated_options.cljc')
-rw-r--r--srv/src/http/static/viz/2/quil/middlewares/deprecated_options.cljc26
1 files changed, 0 insertions, 26 deletions
diff --git a/srv/src/http/static/viz/2/quil/middlewares/deprecated_options.cljc b/srv/src/http/static/viz/2/quil/middlewares/deprecated_options.cljc
deleted file mode 100644
index 6ed40d2..0000000
--- a/srv/src/http/static/viz/2/quil/middlewares/deprecated_options.cljc
+++ /dev/null
@@ -1,26 +0,0 @@
-(ns quil.middlewares.deprecated-options)
-
-(def ^:private deprecated
- {:decor ["2.0" "Try :features [:present] for similar effect"]
- :target ["2.0" "Use :features [:keep-on-top] instead."]
- :safe-draw-fn ["2.0" "Use :features [:no-safe-fns] instead."]})
-
-(defn- check-features-vector [features]
- (let [features (set features)]
- (when (features :no-safe-draw)
- (println "Feature :no-safe-draw was renamed to :no-safe-fns in Quil 2.1."
- "Use :feature [:no-safe-fns] now."))
- (disj features :no-safe-draw)))
-
-(defn deprecated-options
- "Checks if options map contains deprected options and removes them.
- Prints messages how to fix deprecated functions."
- [options]
- (let [options (update-in options [:features] check-features-vector)]
- (->> (for [[name value] options]
- (if-let [[version message] (deprecated name)]
- (do (println name "option was removed in Quil" version "." message)
- nil)
- [name value]))
- (remove nil?)
- (into {}))))