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

Fix additional PowerShell warning (take two) #5100

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Fix additional PowerShell warning (take two) #5100

merged 1 commit into from
Nov 22, 2024

Conversation

andyleejordan
Copy link
Member

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
@andyleejordan andyleejordan deleted the take-two branch November 22, 2024 04:50
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
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
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
Labels
Issue-Bug A bug to squash.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants