babashka / neil

A CLI to add common aliases and features to deps.edn-based projects
MIT License
360 stars 26 forks source link

adds maven for dep search #194

Closed agzam closed 8 months ago

agzam commented 8 months ago

Please answer the following questions and leave the below in as part of your PR.

Aww. Only after figuring this out I just realized there's #162 with a comment. Just following and grabbing that code would've been maybe simpler 🤦

Tested with the following:

$> ./neil dep search clojure
./neil dep search clojure
;; Tons of results from both Maven and Clojars

$> ./neil dep search "org.clojure/clojurescript"

./neil dep search "org.clojure/clojurescript"
Unable to find org.clojure/clojurescript on Clojars.
:lib org.clojure/clojurescript :version "1.11.121" :description "org.clojure/clojurescript on Maven"

$> ./neil dep search "org.clojure/clojure"

./neil dep search "org.clojure/clojure"
Unable to find org.clojure/clojure on Clojars.
:lib org.clojure/clojure-install :version "0.1.21" :description "org.clojure/clojure-install on Maven"
:lib org.clojure/clojure-contrib :version "1.2.0" :description "org.clojure/clojure-contrib on Maven"
:lib org.clojure/clojure :version "1.12.0-alpha5" :description "org.clojure/clojure on Maven"

$> ./neil dep search "clojurefoo"
./neil dep search "clojurefoo"
Unable to find clojurefoo on Maven.
Unable to find clojurefoo on Clojars.

$> ./neil dep search ""
;; produces help info

$> ./neil dep search 123
;; produces help info

$> ./neil dep search '123'
;; produces help info

Also neil.el was adjusted for the changes

borkdude commented 8 months ago

If this is still a work in progress, can you mark the PR as draft? And then ping me for a review when done?

agzam commented 8 months ago

If this is still a work in progress, can you mark the PR as draft? And then ping me for a review when done?

Apologies for constantly buzzing you with change notifications. I thought I was done, but then I realized that Emacs counterpart needs updating too. Seemingly small change turned out to be a bit tricky. It's all good now - I checked it with different inputs. Thank you for your patience.

borkdude commented 8 months ago

Great, I'll have a look tomorrow!

borkdude commented 8 months ago

Aww. Only after figuring this out I just realized there's https://github.com/babashka/neil/issues/162 with a comment. Just following and grabbing that code would've been maybe simpler 🤦

Do you still want give action to this or keep your current code?

agzam commented 8 months ago

Do you still want give action to this or keep your current code?

I glanced over it, looks like it does pretty much almost the same thing. Either way, the bottom line - it works. If you have no objections, perhaps let's merge it and close both tickets. wdyt?

Oh wait. I stand corrected. It also adds GitHub too. We can leave "improve search" ticket open. I may take a look and try adding GH at some point.

borkdude commented 8 months ago

I think adding a test here would be in order:

https://github.com/babashka/neil/blob/ff7aca40de042b398263d4cb6f9d77dbf73c5708/tests.clj#L78-L91

E.g. a test which searches for clojure on maven. After that, I think it'd be good to merge.