-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Convert from pode yaml #1382
base: develop
Are you sure you want to change the base?
Convert from pode yaml #1382
Conversation
Added tests
Added options to change the default behavior
My issue with moving PowerShell code directly into .NET, and using the PS.SDK library, is that there are many edge cases where things could break. For example, if anyone is stuck using PS6, 7, or 7.1, this will break them. Then there's the situation of somebody using PS7.4.4 and we bump the PS.SDK to 7.4.5, does this break them as well? This is why I've always kept anything that's PowerShell specific in PowerShell, and then anything that is .NET standard, if it needs to be for performance reasons or needs a feature PowerShell fundamentally doesn't support, moved into the .NET DLL. Is there a reason you've moved the YAML conversion into .NET? When testing originally its performance seemed alright to me, and I ran it against some large objects to convert. |
I get it, it's frustrating. That’s why I haven’t been pushing hard on this pull request. If you check the code, you'll notice that when netstandard2.0 is the .NET version, the YAML converter isn’t compiled, so Pode falls back to using the "old" PowerShell version. |
Description
This function is doing exactly the reverse of ConvertTo-PodeYaml.
But the logic is the same if an external module is available automatically use it
Also ConvertTo-PodeYaml function is now implemented in C# - Powershell 5.x still uses the powershell implementation