-
Notifications
You must be signed in to change notification settings - Fork 79
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
[BREAKING] 0.4.8 hashtable properties are case-sensitive #161
Comments
Hi @f-bader This is a duplicate of: The change was intentional (details in the above issue), and the fact that there was no warning on my part is bad, and will change in the future. TL;DR so you don't have to read the whole issue:
I will leave this open until the new release is published today. |
Articles like this: https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/rules/useliteralinitializerforhashtable?view=ps-modules Is why I started having gray hairs before my time. Case insensitivity was a mistake. Microsoft telling people to write code that relies on case insensitivity is mind boggling. Especially considering it can lead to data loss if the data source you're consuming is inherently case sensitive (which YAML is). My apologies for breaking compatibility with no notice. I know this may have caused some hours of debugging. That is something I will try harder to avoid in the future. |
HI @gabriel-samfira sorry I missed the already closed incident on this.
Definitely will do. Will implement this pre-release in the testing environment.
Thank you for your continued development and support for this important module! It's the best YAML parser out there. |
A new version has been released: https://www.powershellgallery.com/packages/powershell-yaml/0.4.9 A new release has been generated on GitHub: https://github.com/cloudbase/powershell-yaml/releases/tag/v0.4.9 Please test it out and let me know if all is well. |
This humble module is a thin wrapper on top of the amazing YamlDotNet library. They deserve all the appreciation and support they can get (especially considering they are a small team). |
Fixed in v0.4.9 |
In the latest version
0.4.8
the resulting hastable is created in a way where the keys are looked-up in a case-sensitive manner. However, PowerShell is case-insensitive in nature and it is best to create hashtables with case-insensitive key look-up.This can achieved using IEqualityComparer
If this is intentional it would be great to point it out as a breaking change
The text was updated successfully, but these errors were encountered: