Skip to content
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

use -v / --version to specify a version for a package. Remove version information dupe with --info #479

Closed
Karl-WE opened this issue Jul 4, 2020 · 9 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Milestone

Comments

@Karl-WE
Copy link
Contributor

Karl-WE commented Jul 4, 2020

Description of the new feature/enhancement

currently -v / --version shows the version of the tool.
--info does the same but more verbose (and needed for filing bugs here to complete the information in the template

Proposed technical implementation details (optional)

Please remove --v / -v to display the version and use -i / --info instead

Why?

If you have 2 similar packages by tag or name then the table output is

image

as a user intuitively I would choose --version to pick a specific version of the software from the given output-
Currently there is no documented switch in /? to do this. This is a fresh tool so such a design change is better done earlier than later.

Since the version information is duplicate I see no real reason other than consistency with other tools like Terminal commands to have this.

Please consider this thoughroughly.

@Karl-WE Karl-WE added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jul 4, 2020
@ghost ghost added the Needs-Triage Issue need to be triaged label Jul 4, 2020
@megamorf
Copy link

megamorf commented Jul 6, 2020

Your misunderstanding comes from the difference between command line options for the winget cli and its subcommands. To me this works as expected:

# show winget version
PS> winget -v
PS> winget --version

# pass version option to winget info subcommand
PS> winget show Microsoft.dotnet -v 3.1.301 -e
PS> winget show Microsoft.dotnet --version 3.1.301 --exact

See https://docs.microsoft.com/en-us/windows/package-manager/winget/#use-winget for details.

@Karl-WE
Copy link
Contributor Author

Karl-WE commented Jul 6, 2020

Thanks for your help!

Infact I misunderstood this because I would not expect that -v or --v can have different functions at different levels of this command

winget -v shows the version
winget install -v picks a version

Let's tag it "interesting". On the other hand:

why we need to specify -e or --exact at all. If we specify a version with install -v or --v this should be sufficient. Do you see a potential issue how specifying a version could still be missing something?

@megamorf
Copy link

megamorf commented Jul 7, 2020

why we need to specify -e or --exact at all. If we specify a version with install -v or --v this should be sufficient. Do you see a potential issue how specifying a version could still be missing something?

That's a known user experience issue. An explanation can be found here: #450 (comment)

The main issue ticket this problem is being tracked with is #292.

@denelon
Copy link
Contributor

denelon commented Jul 7, 2020

@Karl-WE thank you for sharing your perspective. We have had several different views on syntax and usability. Most of the commands are thought of as "top level", or "first level" instructions. As such they have a long form --command or short form -c.

Initially, winget --version was intended to let a user know which version of the tool they were using. Later, we added winget --info to provide that and much more detail on the client and the rest of the environment. There have been some thoughts on automation against the client, and the belief was that retaining the initial command with a single line of output might be more conducive to automation so a user doesn't have to parse all of the extra meta-data in --info. There are also some additional nuances when the user has installed directly from the GitHub releases and the desktop App Installer.

@denelon denelon removed the Needs-Triage Issue need to be triaged label Jul 7, 2020
@Karl-WE
Copy link
Contributor Author

Karl-WE commented Jul 7, 2020

Thanks for the behind the scenes reason. I understand it much better now. Hope the split issue / FR can help for better UX.
Would it be possible to output --info into an array for automation? @denelon

@megamorf
Copy link

megamorf commented Jul 7, 2020

Would it be possible to output --info into an array for automation? @denelon

That's being tracked in #184, #285 and #221.

@Karl-WE
Copy link
Contributor Author

Karl-WE commented Jul 7, 2020

Does this issue feature fulfills any target anymore, otherwise I would close.

@jantari
Copy link

jantari commented Jul 8, 2020

Can we please switch to the same syntax all modern cli tools seem to be going towards for specifying a version?

PS> winget show Microsoft.dotnet@3.1.301 -e

Having to add a -v parameter is just blergh. Deno does it like this for example

@megamorf
Copy link

megamorf commented Jul 8, 2020

@Karl-WE I believe this issue can be closed :-)
@jantari You should post your feedback in #406 instead.

@Karl-WE Karl-WE closed this as completed Jul 15, 2020
@denelon denelon added this to the v1.3-Client milestone Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

4 participants