Comments (18)
Yeah, I would say :limit 10
as SQL does.
from neil.
OK for now, we could parse as number whenever we need.
from neil.
@teodorlu We can ignore git deps for now.
from neil.
Draft: https://github.com/teodorlu/neil
- Supports version listing from Clojars only
- Also contains some unrelated CLI additions (
neil dep {add,versions
)
from neil.
Maybe:
neil dep versions :lib hiccup/hiccup
Two level subcommand + the rest kwargs?
from neil.
Keeping the existing :lib
convention makes a lot of sense.
from neil.
Do you have a preference on neil dep ...
vs neil deps ...
?
from neil.
Looks like :lib
is already working on my branch - I copied some of your code:
neil dep versions :lib hiccup/hiccup
from neil.
deps
does relate it to deps.edn
and tools.deps
so maybe that's nice? but dep
is shorter to type which may be a good reason to go with that...
neil dep add ...
neil dep versions ...
I think I like that.
Maybe we should support also:
neil dep add hiccup/hiccup
without the :lib
kw.
from neil.
So when there is a single argument, :lib
would be implied. Small UX tweak.
from neil.
Sounds good to me 👍
from neil.
Should the number of versions we print be configurable as an option? Does :count
make sense as a key?
neil dep add :lib hiccup/hiccup :count 10
from neil.
Any preference on how we should handle parsing :limit
?
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))))
from neil.
Crated a WIP PR from my current branch: #17
I've made a complete mess of the git history -- needs cleaning.
from neil.
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.
- Do we ignore other forges than Github, like Gitlab and Sourcehut? Existing code seems to assume Github.
- "Listing versions" makes sense in a Maven/Clojars world. Is a "version" a git ref? A content hash? A tag? I'm not sure.
- What is the typical usage for Git deps?
If neil dep versions
is a subcommand, does that subcommand make sense for Git?
🤔
from neil.
We could possibly "construct" a list of options that make some kind of sense.
- SHA for HEAD
- Most recent tags
Then we'd have to print something - that ideally can be piped back into neil add dep
(neil dep add
if we change it).
from neil.
The Clojure CLI has a way to list versions too btw, does it support git deps?
from neil.
It does - it lists git tags:
clj -X:deps find-versions :lib io.github.clojure/tools.gitlibs
{:git/tag "tools.gitlibs-0.1.3"}
{:git/tag "tools.gitlibs-0.1.8"}
{:git/tag "tools.gitlibs-0.2.23"}
{:git/tag "tools.gitlibs-0.2.27"}
{:git/tag "tools.gitlibs-0.2.32"}
{:git/tag "tools.gitlibs-0.2.40"}
{:git/tag "tools.gitlibs-0.2.47"}
{:git/tag "tools.gitlibs-0.2.54"}
{:git/tag "tools.gitlibs-0.2.59"}
{:git/tag "tools.gitlibs-0.2.64"}
{:git/tag "tools.gitlibs-1.0.100"}
{:git/tag "tools.gitlibs-1.0.83"}
{:git/tag "tools.gitlibs-1.0.87"}
{:git/tag "tools.gitlibs-1.0.91"}
{:git/tag "tools.gitlibs-1.0.96"}
{:git/tag "tools.gitlibs-2.0.109"}
{:git/tag "tools.gitlibs-2.0.119"}
{:git/tag "tools.gitlibs-2.1.129"}
{:git/tag "tools.gitlibs-2.1.139"}
{:git/tag "tools.gitlibs-2.1.144"}
{:git/tag "tools.gitlibs-2.2.152"}
{:git/tag "tools.gitlibs-2.2.156"}
{:git/tag "tools.gitlibs-2.3.161"}
{:git/tag "v0.0"}
{:git/tag "v2.3.167"}
{:git/tag "v2.4.172"}
from neil.
Related Issues (20)
- Error when running `neil --version` on versions `>=0.1.58` HOT 1
- Suggestion: `neil dep local <lib> <path>` HOT 2
- neil dep upgrade drops dep :exclusions HOT 2
- Neil completely crashes on fresh install HOT 24
- `neil dep add` exits with code 0 on both failure and success HOT 1
- Neil new behaviour different for windows HOT 4
- NPE on `neil dep upgrade ` HOT 5
- suggestion: support `neil add nrepl -with-cider` HOT 3
- Documentation: add git as a requirement HOT 1
- Feature request: a flag that does what `dep search` already does, but works for multiple artifacts and outputs a string suitable for `-Sdeps` HOT 3
- Neil does not use the latest version of slipset/deps-deploy in the `neil add build` command
- suggestion: use DEPS_CLJ_TOOLS_DIR to detect DEPS_CLJ_TOOLS_VERSION HOT 2
- Newlines should be added when adding dependencies HOT 2
- Suggestion: Add human-readable output to `neil dep add` HOT 1
- `neil add kaocha` adds `:kaocha` alias with irregular indent HOT 5
- `neil add` could provide usage help rather than crash HOT 2
- After merging #216, `neil add` produces super long lines for certain aliases HOT 4
- Allow "pinning" a dependency, so it is not changed on global "upgrade" HOT 2
- neil dep upgrade still upgrades git dep HOT 8
- neil dep upgrade inserts git/url into upgraded dep HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neil.