Closed andyleejordan closed 7 months ago
Hey @HowardWolosky, this will result in PowerShellForGitHub to be completely broken with the upcoming release of PowerShell 7.4.
Hey @HowardWolosky, this will result in PowerShellForGitHub to be completely broken with the upcoming release of PowerShell 7.4.
Thanks for the heads-up. I'm certainly open to suggestions on alternative approaches to achieving the same result. It's used to reliably duplicate an object:
I can do some testing to see if using JSON as an intermediary would achieve the same result. I vaguely remember trying to do so back in 2015 when I first wrote that method and had poor results.
I'm likewise researching what the migration is supposed to be, I'll let you know if I uncover something!
Supposedly JSON serialization/deserialization should work well enough via System.Text.Json
. When used to serialize to a memory stream and from a memory stream, it should be very similar to existing code that uses BinaryFormatter
.
When using this module with PowerShell 7.4.0-preview.4, it breaks like this:
Related to https://github.com/PowerShell/PowerShell/issues/19878, the BinaryFormatter is insecure and is being removed from .NET (and PowerShell).