Fix additional PowerShell warning (take two)#5100
Merged
andyleejordan merged 1 commit intomainfrom Nov 22, 2024
Merged
Conversation
380302c to
d705b20
Compare
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).
d705b20 to
e0f2130
Compare
JustinGrote
reviewed
Nov 22, 2024
JustinGrote
reviewed
Nov 22, 2024
Collaborator
JustinGrote
left a comment
There was a problem hiding this comment.
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.
JustinGrote
approved these changes
Nov 22, 2024
Collaborator
JustinGrote
left a comment
There was a problem hiding this comment.
LOTM (Looks Obtuse to Me)
JustinGrote
approved these changes
Nov 22, 2024
Collaborator
JustinGrote
left a comment
There was a problem hiding this comment.
LOTM (Looks Obtuse to Me)
Member
Author
Unfortunately yes but I didn't think of a cleaner way even over the weekend. At least the tests are less obtuse! |
Collaborator
|
Agreed, me either, was just a joke basically of LGTM because I can't figure out anything better :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?