Skip to content
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

Feature Request: Native support for YAML #16819

Closed
8YdEo37 opened this issue Jan 30, 2022 · 5 comments
Closed

Feature Request: Native support for YAML #16819

8YdEo37 opened this issue Jan 30, 2022 · 5 comments
Labels
Issue-Enhancement the issue is more of a feature request than a bug Resolution-Duplicate The issue is a duplicate. WG-Cmdlets general cmdlet issues

Comments

@8YdEo37
Copy link

8YdEo37 commented Jan 30, 2022

Summary of the new feature / enhancement

My personal use case is configuration files, but would be perfect to ingest any yaml structure without extra modules with stale development and with official support for PS +7

In my opinion, Yaml is getting mature enough to bring it natively to Powershell without hassle around JSON

PS: Thanks for pushing hard forward and making Powershell so good nowadays ! ;)

Proposed technical implementation details (optional)

No response

@8YdEo37 8YdEo37 added Issue-Enhancement the issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. labels Jan 30, 2022
@8YdEo37 8YdEo37 changed the title Native support for YAML Feature Request: Native support for YAML Jan 30, 2022
@iSazonov iSazonov added the Resolution-Duplicate The issue is a duplicate. label Jan 30, 2022
@jhoneill
Copy link

jhoneill commented Jan 31, 2022

There are multiple issues for this already:

A couple of points before this one is marked as closed,

  • It would be good to have an official statement - even if just team blog post entitled "Why doesn't PowerShell ship a YAML module" this has been rumbling along for five years now and people will keep asking.
  • There is a community module. https://www.powershellgallery.com/packages/powershell-yaml/0.4.2 With 18 million downloads it has become the de-facto way to add YAML support, the OP terms it stale (last update was May 2020) others might call it stable :-) It uses https://github.com/aaubry/YamlDotNet which has been pull from nuget over 30 million times, and has been updated more recently.

What would people like the PowerShell team to do ?

  1. Find a way to ship the community module with PowerShell 7.x ? (Possibly fork the code and maintain it, but it means taking a dependency on a third party YAML library for .NET with which comes with that)
  2. Build a "clean clone" version of the community module? i.e. the same commands work, the same YAML library is doing the work under the surface (same dependency issues) but the module code comes from the team
  3. Lobby the powers-that-be on the .NET team to add YAML support (much as Json support was added after years of relying on 3rd party libraries), and when they do add cmdlets to leverage it
  4. Write their own parser (which requires significant effort, and would likely be dropped if/when YAML support goes into .NET)

None of these would allow PowerShell to do something it can't do now using a 3rd party module, or to do it very much better, than the third party module ; they address the problem that some people using PowerShell want all modules they use to be first-party ones; I have worked for customers who make the processes to adopt 3rd party modules an onerous one so I understand that this can be for good reason. If the PowerShell team took a dependency on YamlDotNet, things could be made easier for those customers. But it is easy to see this could be repeated for many, many things - more than the team could ever have capacity for. That's why the default position is these additions should come from the community - people can make a case that X should not follow that default, but to date the case made for YAML hasn't convinced the people it needs to.

Powershell module for serializing and deserializing YAML
GitHub
YamlDotNet is a .NET library for YAML. Contribute to aaubry/YamlDotNet development by creating an account on GitHub.

@vexx32
Copy link
Collaborator

vexx32 commented Jan 31, 2022

This comment in one of the linked issues above discusses the reasoning / stance of the pwsh team. As far as I know it hasn't changed much. 🙂

@vexx32 vexx32 removed the Needs-Triage The issue is new and needs to be triaged by a work group. label Jan 31, 2022
@iSazonov iSazonov added the WG-Cmdlets general cmdlet issues label Jan 31, 2022
@jhoneill
Copy link

jhoneill commented Feb 1, 2022

@vexx32 Indeed. I'm remined of

"I eventually had to go down to the cellar... with a torch." (flashlight)
'The lights had probably gone.’
"So had the stairs."
'You found the notice didn’t you?'
"Yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying 'Beware of The Leopard'."

Instead of having the teams position in a comment to a closed issue on github it might be helpful to give it a bit more, you know, prominence :-)

@ghost
Copy link

ghost commented Feb 2, 2022

This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.

@ghost ghost closed this as completed Feb 2, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement the issue is more of a feature request than a bug Resolution-Duplicate The issue is a duplicate. WG-Cmdlets general cmdlet issues
Projects
None yet
Development

No branches or pull requests

4 participants