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

Appearance settings

Revert refactoring changes that broke remoting to Windows PowerShell 5.1#5321

Merged
daxian-dbw merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:remoting-callbackSteveL-MSFT/PowerShell:remoting-callbackCopy head branch name to clipboard
Nov 9, 2017
Merged

Revert refactoring changes that broke remoting to Windows PowerShell 5.1#5321
daxian-dbw merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:remoting-callbackSteveL-MSFT/PowerShell:remoting-callbackCopy head branch name to clipboard

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

Call backs depend on private members to have the same name across versions of PowerShell. Specifically fixes prompts and clear.

@PaulHigin are there other callbacks I need to fix? I noticed that ctrl+c doesn't work from PSCore6 to Windows PowerShell 5.1.

Fix #4615

@lzybkr lzybkr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sigh - it's silly that the protocol requires the names of the private fields. I suppose it's just an expedient implementation detail - just use reflection, but it's so brittle.

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

@lzybkr I agree now that I've learned how this aspect of the protocol works

public sealed
class ChoiceDescription
{
// DO NOT REMOVE OR RENAME THESE FIELDS - it will break remoting

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the warning messages should say "it will break remoting compatibility with Windows PowerShell".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is incomplete. To fully fix this incompatibility we need to revert field names for all encoded class/structs. Here is the supported list:
https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteHostEncoder.cs#L41

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I reused an existing comment. I can update all occurrences of that comment to be more specific. Thanks for the pointer to the list of types, I'll fix those as well.

@TravisEz13

Copy link
Copy Markdown
Member

@SteveL-MSFT One of the commits is not linked to your github account.

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

@TravisEz13 fixed

public sealed
class ChoiceDescription
{
// DO NOT REMOVE OR RENAME THESE FIELDS - it will break remoting compatibility with Windows PowerShell compatibility with Windows PowerShell

@mirichmo mirichmo Nov 6, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What about putting these fields within a region to make the grouping more explicit? The "Do Not Remove or Rename" region?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good idea. Will make an update.

@SteveL-MSFT SteveL-MSFT added this to the 6.0.0-RC milestone Nov 7, 2017
@SteveL-MSFT

Copy link
Copy Markdown
Member Author

@TravisEz13 can you merge?

@daxian-dbw daxian-dbw merged commit b194731 into PowerShell:master Nov 9, 2017
@SteveL-MSFT SteveL-MSFT deleted the remoting-callback branch November 12, 2017 05:17
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.

Remoting host callbacks incompatible between PowerShell 5.1 and 6.0

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.