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

Initial draft of the winget extension #356

Merged
merged 15 commits into from
Jan 24, 2025
Merged

Initial draft of the winget extension #356

merged 15 commits into from
Jan 24, 2025

Conversation

zadjii-msft
Copy link
Owner

@zadjii-msft zadjii-msft commented Jan 22, 2025

targets #355, which I need for improvements to messages

  • The initial package load takes a long time. This is pretty much unavoidable, but we do it on cmdpal startup, so anything after about 12s should be snappy
  • I cannot for the life of me get FindPackagesAsync, to be async. The call always ends up running synchronously, so I can't hook up the operation.Completed event, nor the cancellation. The action is already complete!
    • this is probably blocking, because we still end up doing a search on most keystrokes, so we only get the final results after all the intermediate ones are done.
    • Just pasting a search though? Just as snappy as you'd hope.
    • Ahahahaha it wasn't me: microsoft/winget-cli#5151
    • ✅ manually wrapping this in a BG thread made it better
  • We probably shouldn't make the default action for an installed package "Uninstall".
    • Probably want to shunt over to the Settings app for the package
    • We probably want to do the thing where the second command doesn't show up if it's a separator
    • Punt? punt
  • We need to add more metadata in the details for packages. We have it, if only we could show it: Implement DetailsData elements #95
    • This will be a follow-up
  • This needs localization too
  • I'm using the 1.10-preview of the winget com interfaces. On my framework laptop at least, the RefreshPackageCatalogAsync API isn't yet implemented, so I need to test that
  • I don't think we implemented MoreCommands being observable in the host yet. We should.
  • I probably also need to check if other APIs we're using exist or not
  • I haven't tested situations that like, need you to accept a license? Installing nano and the NanoLeaf app both just work.
    • Punted?

@zadjii-msft zadjii-msft linked an issue Jan 22, 2025 that may be closed by this pull request

This comment has been minimized.

@zadjii-msft
Copy link
Owner Author

But it does work:
image

and it's hype
winget-install-prototype

This comment has been minimized.

@@ -190,6 +190,7 @@
closesocket
CLSCTX
CLSIDs
Clsids

Check warning

Code scanning / check-spelling

Ignored Expect Variant Warning

Clsids is ignored by check spelling because another more general variant is also in expect. (ignored-expect-variant)
Base automatically changed from dev/migrie/f/hide-messages to main January 23, 2025 22:07
@zadjii-msft zadjii-msft marked this pull request as ready for review January 24, 2025 12:48
@zadjii-msft zadjii-msft merged commit 8f95341 into main Jan 24, 2025
5 of 6 checks passed
var internalSearchTask = Task.Run(() => catalog.FindPackages(opts), ct);
var searchResults = await internalSearchTask;

// TOOD more error handling like this:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

TOOD is not a recognized word. (unrecognized-spelling)
Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

Unrecognized words (1)

TOOD

To accept these unrecognized words as correct, you could run the following commands

... in a clone of the [email protected]:zadjii-msft/PowerToys.git repository
on the dev/migrie/f/winget branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.24/apply.pl' |
perl - 'https://github.com/zadjii-msft/PowerToys/actions/runs/12949934986/attempts/1'

OR

To have the bot accept them for you, comment in the PR quoting the following line:
@check-spelling-bot apply updates.

Errors (1)

See the 📂 files view, the 📜action log, or 📝 job summary for details.

❌ Errors Count
❌ ignored-expect-variant 5

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

zadjii-msft added a commit that referenced this pull request Jan 27, 2025
Tested with the `command-line` tag, because there's no extensions in winget until microsoft/winget-pkgs#216685 merges

Also adds a link to search in the Store, though I think that won't be as useful. 

Lastly - also actually fixes the tag search 😅

Builds on #356
Closes #89
Probably needs #370 to feel right
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.

Built-in WinGet extension
2 participants