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

Allow Version Listing through 'Winget Search' #2847

Merged
merged 3 commits into from
Jan 25, 2023

Conversation

Trenly
Copy link
Contributor

@Trenly Trenly commented Jan 13, 2023


This PR moves the workflow for ShowAppVersions into the workflow base and makes it available to the search command.
Intentionally left the search command as SearchSourceForMany to retain the same searching behavior.

PS C:\WINDOWS\system32> wingetdev search 7zip.7zip --versions
Multiple packages found matching input criteria. Please refine the input.
Name              Id                  Source
--------------------------------------------
7-Zip             7zip.7zip           winget
7-Zip Alpha (msi) 7zip.7zip.Alpha.msi winget
7-Zip Alpha (exe) 7zip.7zip.Alpha.exe winget
PS C:\WINDOWS\system32> wingetdev search -e 7zip.7zip --versions
Found 7-Zip [7zip.7zip]
Version
----------
22.01
22.00
21.07
21.06
19.00.00.0
16.04
Microsoft Reviewers: Open in CodeFlow

@Trenly Trenly requested a review from a team as a code owner January 13, 2023 04:00
@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@denelon
Copy link
Contributor

denelon commented Jan 13, 2023

What if we do the same thing we're doing for winget install with the "interactive / prompt" mode?

I've been looking at several issues this morning and thinking more about the other "mode" of behavior for WinGet.

@denelon
Copy link
Contributor

denelon commented Jan 13, 2023

We could add the optional argument as a hint to the output when we get ambiguous results.

@Trenly
Copy link
Contributor Author

Trenly commented Jan 13, 2023

What if we do the same thing we're doing for winget install with the "interactive / prompt" mode?

I've been looking at several issues this morning and thinking more about the other "mode" of behavior for WinGet.

UX is certainly the hard part here. I think that the interactivity / other "mode" is a bit of a tangent that's getting intermixed. At the root of the question in this PR is really more "how important is it to keep search behavior the same within a command"

I see it as this -

  1. Do we truly want users to be able to list versions of a package through winget search?

If yes:

  1. Do we want the search results when using the --versions argument to be consistent with winget show <query> (search source for multiple) or with winget search <query> (search source for single) or, does this feature need to wait for the alternate "mode" of UX?
    • If consistent with winget search -
      • Pro: Search results will be the same when using --versions
      • Pro: Partial package names / ids can be used
      • Pro: Packages can be matched by tag or command
      • Con: There is a higher likelihood that users will see Please refine your input message
      • Con: It may be hard to get to the single package a user wants a version for
    • If consistent with winget show -
      • Pro: It will be easier to get to a single package
      • Con: Full ID's, monikers, or names must be used
      • Con: Could lead to confusion as to why the same base command produces different search results
      • Pro: It will help the user refine their input before they go to use winget install

@denelon
Copy link
Contributor

denelon commented Jan 13, 2023

Let's get some user feedback: https://twitter.com/DenelonMs/status/1613963532873388032

@denelon
Copy link
Contributor

denelon commented Jan 23, 2023

poll

@yao-msft
Copy link
Contributor

So when search returns multiple results, do we want to do:
Option 1: "Multiple matches found, please refine input"
Or
Option 2: "List all versions as a new column for all matched ones" like

Id        Name       Versions
---------------------------------------
Foo1   Bar1         1.0, 2.0, 3.0
Foo2   Bar2         1.0, 2.0, 3.0

I guess 2 if user is expecting "consistency with search behavior"?

@denelon
Copy link
Contributor

denelon commented Jan 23, 2023

I think it's pretty much what was put in the original description. The user will need to refine the input to get versions with "search".

@yao-msft
Copy link
Contributor

I think it's pretty much what was put in the original description. The user will need to refine the input to get versions with "search".

Ok, then this change is good at current state.

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yao-msft
Copy link
Contributor

Somehow the license/cla task is stuck. And I cannot override it without changing project settings. Try close and reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants