Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix additional PowerShell warning (take two) #5100

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

Merged
andyleejordan merged 1 commit into main from take-two
Nov 22, 2024
Merged

Fix additional PowerShell warning (take two) #5100

andyleejordan merged 1 commit into main from take-two
Nov 22, 2024

Conversation

Copy link
Member

@andyleejordan andyleejordan commented Nov 21, 2024

Since Show Session Menu always fully enumerates the iterator we needed to move the existence check into the generator. Fortunately the 'exists' method was already idempotent. I'd like this to be cleaner, but at least the tests now make sense (and required a stub fix).

This is a follow up to #5099 after further testing.

@JustinGrote can you think of a way to simplify this logic?

Since Show Session Menu always fully enumerates the iterator we needed
to move the existence check into the generator. Fortunately the 'exists'
method was already idempotent. I'd like this to be cleaner, but at least
the tests now make sense (and required a stub fix).
Copy link
Collaborator

@JustinGrote JustinGrote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's a better approach I cant think of it, since these are filesystem tasks the awaits are actually useful to free up the extension to do other things while the search is happening. Just one item that I see with exists() before I approve.

Copy link
Collaborator

@JustinGrote JustinGrote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOTM (Looks Obtuse to Me)

@andyleejordan andyleejordan merged commit 3c71fcf into main Nov 22, 2024
7 checks passed
Copy link
Collaborator

@JustinGrote JustinGrote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOTM (Looks Obtuse to Me)

Copy link
Member Author

LOTM (Looks Obtuse to Me)

Unfortunately yes but I didn't think of a cleaner way even over the weekend. At least the tests are less obtuse!

JustinGrote reacted with thumbs up emoji

Copy link
Collaborator

Agreed, me either, was just a joke basically of LGTM because I can't figure out anything better :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@JustinGrote JustinGrote JustinGrote approved these changes

Assignees
No one assigned
Labels
Issue-Bug A bug to squash.
Projects
Status: Done
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /