Skip to content
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

Merged

Conversation

yannvanhalewyn
Copy link
Contributor

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.

@@ -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]
Copy link
Member

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.

Copy link
Contributor Author

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))
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bbatsov bbatsov merged commit 71e057c into clojure-emacs:master Oct 9, 2019
@bbatsov
Copy link
Member

bbatsov commented Oct 9, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants