As discussed in #7, this pull request should enable lein-try to handle calls without explicit version numbers, e.g.:
lein try panoptic
The mechanism relies on the new function version-string? which determines if a given String represents a version number by checking against "RELEASE", "LATEST" and whether it starts with a number or not. Since artifact IDs may not start with a number (Clojure symbols mustn't, at least), I think this will suffice. (Maybe the lowercase Strings "release" and "latest" should be included?)
Example:
$ lein try panoptic
Retrieving panoptic/panoptic/0.2.1/panoptic-0.2.1.pom from clojars
Retrieving panoptic/panoptic/0.2.1/panoptic-0.2.1.jar from clojars
nREPL server started on port 34336
REPL-y 0.2.0
Clojure 1.5.1
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
user=>
As discussed in #7, this pull request should enable lein-try to handle calls without explicit version numbers, e.g.:
The mechanism relies on the new function
version-string?
which determines if a given String represents a version number by checking against"RELEASE"
,"LATEST"
and whether it starts with a number or not. Since artifact IDs may not start with a number (Clojure symbols mustn't, at least), I think this will suffice. (Maybe the lowercase Strings"release"
and"latest"
should be included?)Example: