-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback to Clojars for finding artifact version #268
Fallback to Clojars for finding artifact version #268
Conversation
src/refactor_nrepl/artifacts.clj
Outdated
@@ -101,6 +101,14 @@ | |||
(map #(vector (str group-id "/" %) nil)))) | |||
group-ids))) | |||
|
|||
(defn get-clojars-versions! | |||
"Fetches all the versions of particular artifact from Clojars." | |||
[for-artifact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd name this just artifact
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me too, I followed the convention of the other function. Will update!
@@ -125,7 +133,8 @@ | |||
(defn artifact-versions | |||
[{:keys [artifact]}] | |||
(->> (or (get @artifacts artifact) | |||
(get-mvn-versions! artifact)) | |||
(seq (get-mvn-versions! artifact)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good idea to explain the behaviour of this function in the docstring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks! |
I had opened issue #267. This is the PR to solve the issue. This will use the Clojars API to fetch artifact versions if there are none to be found in Maven. The goal of this is to allow
cljr-update-project-dependency(ies)
to work with Clojars-only libraries, such as clj-http, clj-time and aero.