Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Jun 7, 2018

PR Summary

PowerShell serialization has a list of known PowerShell types. When an object is deserialized containing a known type it tries to deserialize the object to that specific type and throws exception if it can't succeed. SemanticVersion only exists in PSCore6 so when remoting from Windows PowerShell or importing clixml generated from PSCore6 that contains SemanticVersion, it fails.

Fix #6448
Fix #1819

PR Checklist

@iSazonov
Copy link
Collaborator

iSazonov commented Jun 7, 2018

It seems to be not in line with the PowerShell Committee's conclusion in #6448.

@SteveL-MSFT SteveL-MSFT added the Review - Committee The PR/Issue needs a review from the PowerShell Committee label Jun 7, 2018
@SteveL-MSFT
Copy link
Member Author

@iSazonov you are correct, that committee decision was based on an incorrect hypothesis.

Copy link
Member

@daxian-dbw daxian-dbw left a comment

Choose a reason for hiding this comment

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

LGTM. This is probably the cleanest way to deal with this issue 🎉

@daxian-dbw
Copy link
Member

daxian-dbw commented Jun 7, 2018

One drawback: when PowerShell Core talks to PowerShell Core, the client side won't have a full-fledged SemanticVersion object deserialized back. So potentially this is a breaking change.

Strike my previous comment. It will be deserailzied to a PSObject with all properties from the SemanticVersion object populated. Problem solved, perfectly!

@HemantMahawar
Copy link
Contributor

Given it will come back as Deseriealized.System.Management.Automation.SemanticVersion (PSObject) in both Windows PowerShell and PowerShell Core, feels like the right fix.

@SteveL-MSFT SteveL-MSFT added Committee-Reviewed PS-Committee has reviewed this and made a decision and removed Review - Committee The PR/Issue needs a review from the PowerShell Committee labels Jun 7, 2018
@SteveL-MSFT
Copy link
Member Author

@PowerShell/powershell-committee reviewed this and agree this is approach

Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

I agree that this is the right change.

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

Labels

Committee-Reviewed PS-Committee has reviewed this and made a decision

Projects

None yet

5 participants