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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume changing the title would be a breaking or otherwise undesirable change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't wanting to change the internal messages in case I missed one. Unless someone is using the command palette to run PowerShell.OnlineHelp directly, then this shouldn't be a breaking change...
That being said, I used search and replace across the workspace (PSES and vscode-powershell) to find and replace all of the instances that referred to OnlineHelp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the command should be called
PowerShell.ShowHelp
,ShowOnlineHelp.ts
renamed toShowHelp.ts
, etc. The breaking change I think would come from changing the LSP message that PSES expects. In that case, couldn't we create handle a new messagepowerShell/showHelp
while also handling the original messagepowerShell/showOnlineHelp
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rkeithhill I think we were going off of the idea that vscode is likely the only editor that takes advantage of this message at this time so the change was lower risk since we control both.
That said, I'll stand by you if you feel like we should do the is right way and handle the breaking change correctly (by not having a breaking change 😄 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rkeithhill Yes that seems like the right behaviour. PSES should support a deprecated
powerShell/showOnlineHelp
message as an alias ofpowerShell/showHelp
I thinkThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if I'm reading this correctly, @rkeithhill is suggesting I change all of the things I already changed (and stripped out of commit history because we said not to), and then on the PSES side of things have the same handler accept both
powerShell/showOnlineHelp
andpowerShell/showHelp
?If that's the way we want to go, I'm game for doing it. But this time around I'm going to wait for the thumbs up 😜
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we leave the "command" name as-is for 1.x - leave it at
PowerShell.OnlineHelp
. In theory, it could be used by others via the VSCode API that allows you invoke a command by name. But I think everything else (ShowOnlineHelp.ts filename, etc) should be changed to reflect the new semantics of the command.Then in v2, let's rename the command to
PowerShell.ShowHelp
and document it as a breaking change.Yes. And in v2 we could remove the
powerShell/showOnlineHelp
message and document the breaking change there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modified both sides to note the deprecation of showOnlineHelp. Currently in vscode-powershell is a command that actually sends this message to PSES so that I could test the warning on PSES's side.
I think with the way the code is now, we should be able to mark it as deprecated, and when ready to remove as breaking change it's just a matter of removing it. From experience: I prefer this type of warning before removal because a lot of people don't read the change notes (unfortunately) and then freak out even if it was noted as a breaking change.