-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Remove SemanticVersion from list of KnownTypes for serialization #7016
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
Conversation
|
It seems to be not in line with the PowerShell Committee's conclusion in #6448. |
|
@iSazonov you are correct, that committee decision was based on an incorrect hypothesis. |
daxian-dbw
left a comment
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.
LGTM. This is probably the cleanest way to deal with this issue 🎉
|
Strike my previous comment. It will be deserailzied to a |
|
Given it will come back as |
|
@PowerShell/powershell-committee reviewed this and agree this is approach |
PaulHigin
left a comment
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 agree that this is the right change.
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
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests