conditional deprecation #1982
Unanswered
dchelimsky
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I'm converting this to a Q&A since I'm fairly sure clj-kondo already has what you need. The linter you're searching for is probably: https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#discouraged-var You can make a configuration for all of your libs which discourages Projects that still use clojure 1.11 can override this config in their local |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
Is your feature request related to a problem? Please describe.
We have a utility function library with
map-vals
, that does the same thing as clojure-1.11'sclojure.core/update-vals
, but predates it. We have some consumers that are using clojure-1.11, but some that are using older versions. We'd like to convey to consumers using 1.11 that our home-grownmap-vals
is deprecated and you should useclojure.core/update-vals
, but consumers using < 1.11 would not see this.Describe the solution you'd like
Here's one idea, but I'm sure there are plenty of others that would work: add support for e.g.
:deprecated {:doc "..." :replaced-by {:lib "org.clojure/clojure" :version "1.11.0"}}
. This would support the idea for any library at all.clj-kondo
would have to look validate this against the project's dependencies.Describe alternatives you've considered
The keys could be named differently, and/or could be flattened (all at top level of the metadata map)
Beta Was this translation helpful? Give feedback.
All reactions