eval / deps-try

Try out Clojure (libraries) via rebel-readline
MIT License
120 stars 4 forks source link

Error when trying dep without namespace #27

Open jeroenvandijk opened 1 year ago

jeroenvandijk commented 1 year ago

I tried deps-try amazonica "0.3.165" which results in an error Could not find path '***/amazonica'

I should have tried deps-try amazonica/amazonica "0.3.165" instead, and then things work as expected.

This might not be obvious for new users. I also had to think for a bit. And this would also not be obvious by reading the README of Amazonica where it is still [amazonica "0.3.165"].

When there is no namespace maybe if the directory doesn't exist (in this case amazonica), deps-try could try to resolve it as a dependency?

(*) tested with version deps-try-dev v0.8.0

eval commented 1 year ago

I was just thinking about this recently and was wondering if this is an expectation, so thanks for bringing this up 👍🏻

I think it's unwanted to make deps-try foo automatically work as deps-try foo/foo as this would allow for continuing not using a group-id. Also clashing with a planned command-style CLI, e.g. deps-try recipes [ls|help].

I think an error with a did-you-mean-message would be apt - which could be implemented as a maven/clojars-search and so would also work for someone trying deps-try malli.

jeroenvandijk commented 1 year ago

Ah cool. Yeah I like your proposal more. I think it is less confusing and more consistent. And like what you said, it would indeed also help promote using the group-id.