-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add command to search Maven #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, nice! Also thanks for choosing sttp. I didn't mention a preference for an http client but you chose my favorite one. 😉
Multiple results not showing up is my fault. That's a bug, but can be addressed separately.
As for this feature, it looks fine to me. Maybe in the future we could support more input types. Like if you use the argsPreview(args: List[String], context: CommandContext)
event you could also specify it in CLI-like format like -g group -a artifact
and so on. The benefit there being that you can better error messages and usage hints with Decline.
I wonder if it's worth accepting SBT-like format too like: "dev.zio" %% "zio"
(leaving off the version) and "dev.zio" %% "zio" % "1.0.0-RC21-2"
. Though supporting %%
is a little awkward since we don't really know which version of Scala they're using.
Let me add that.
Maybe we can allow user to configure the scala version? |
Thanks. I wonder if this means 2 HTTP requests will be sent. I guess it depends if you early-exit
That could work. Or just assume the latest Scala version. I don't think it's too bad if not accurate 100% of the time. If they want something other than the latest, the option to use |
Make sense, I overlooked that. Will leave the args one for later then.
👍 |
Sure, that's fine with me. |
The new execution model should solve the double execution problem. I have an example in As for adding tests, I'll probably do that over the weekend. |
Ref #15
It send a request to https://search.maven.org/ and parse the result. Here are some examples: