-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
CLI for listing available versions of a library #16
Comments
Draft: https://github.com/teodorlu/neil
|
Maybe:
Two level subcommand + the rest kwargs? |
Keeping the existing |
Do you have a preference on |
Looks like
|
I think I like that. Maybe we should support also:
without the |
So when there is a single argument, |
Sounds good to me 👍 |
Should the number of versions we print be configurable as an option? Does
|
Yeah, I would say |
Any preference on how we should handle parsing It doesn't strictly need to be parsed if we're just using it to create URLs. But passing around numbers as strings, and encoding that into option maps seems kind of dirty: (defn mvn-versions [qlib {:keys [limit] :or {limit "10"}}]
(let [payload
(-> (curl/get (format "https://search.maven.org/solrsearch/select?q=g:%s+AND+a:%s&core=gav&rows=%s"
(namespace qlib)
(name qlib)
limit)
curl-opts)
:body
(cheshire/parse-string true))]
(->> payload
:response :docs
(map :v)))) |
OK for now, we could parse as number whenever we need. |
Crated a WIP PR from my current branch: #17 I've made a complete mess of the git history -- needs cleaning. |
I'm honestly not sure about git deps. I rarely use git deps myself, so I don't feel like I know common use cases.
If 🤔 |
We could possibly "construct" a list of options that make some kind of sense.
Then we'd have to print something - that ideally can be piped back into |
@teodorlu We can ignore git deps for now. |
The Clojure CLI has a way to list versions too btw, does it support git deps? |
It does - it lists git tags:
|
WIP PR: #17
For example:
If we add this, we could create a one liner to add a specific version of a dependency to
deps.edn
. For example using fzf.Example grepping for version 1.0:
The text was updated successfully, but these errors were encountered: