Skip to content

Azure uses YAML. Please finally add ConvertFrom-Yaml, ConvertTo-Yaml #16785

Closed

Description

@schittli

Prerequisites

Steps to reproduce

  1. Start using PowerShell and Azure Pipelines with YAML
  2. Now Microsoft expects that customers have to install uncontrolled opensource modules just so PowerShell can work with YAML
  3. For us, this is extremely unexpected
  4. And it's a pain for many years that M$ has no inner motivation to keep the PowerShell technology stack up to date.

Expected behavior

Get-Content 'config.yaml' | ConvertFrom-Json
# of course, ConvertTo-Yaml is missing too.

# It's a shame that we have to explain it.

Actual behavior

# 1. Search an open Source PowerShell module that handles yaml
# 2. make a review to be sure it has no security issues
# 3. Install and test the module
# 4. Search the next module, test it
# 5. If you finally have a Module, install and use it.
# 6. For each Modul-Update, restart at step 3.

Error details

No response

Environment data

# Rel. 7.x must have yaml support
# Rel. 5.x should have yaml support

Name                           Value
----                           -----
PSVersion                      5.1.19041.1023
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1023
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Visuals

No response

Activity

  1. iSazonov commented on Jan 21, 2022

    @iSazonov
    Collaborator

    Conclusion "Won't fix" was made by WG-Cmdlets in Aug,2021 #3607 (comment)

    It seems .Net hasn't plans to implement YAML so close as duplication.

  2. jhoneill commented on Jan 21, 2022

    @jhoneill

    To put everything in one place here is what was said in 3607

    @PowerShell/wg-powershell-cmdlets has been discussing this issue, and despite the extremely high demand (and my own personal desire to have strong, canonical YAML cmdlets), we're unfortunately going to have to close it (for now) as Won't Fix. The reasoning is two-fold:

    (1) While the PowerShell package is already fairly large, we're doing our best not to add new dependencies to the package so that we don't continue to grow our size unfettered, and because we believe that pulling modules from the PowerShell Gallery (or an internal trusted Gallery, having been vetted appropriately by an enterprise) should be a standard part of a PS7 workflow.
    (2) As a team, we simply don't have the capacity to build a .NET YAML parser from scratch, nor do we have the capacity to vet, support, and service a 3rd party library for which the security implications are high-stakes.
    If .NET were to officially support a YAML library, we (as Microsoft) could potentially look into supporting a YAML module on the Gallery. But until that point, the existing community modules will have to suffice.

    The community module referred to has been downloaded 18 million times. It is based on YamDotNet has been download from Nuget 36 Million times. But as the quote above says the team don't have the capacity to "vet support and service" it (I'm not sure what happened with NewonSoftJson before .NET added native JSON support).

    We have a classic case of different Microsoft teams ignoring each other .

    • Azure Pipelines team YAML Is new and shiny let's be the first to use it!!! BTW despite the title Azure generally uses JSON and only pipelines use YAML.
    • PowerShell team Customers want us to do more things than Microsoft gives resource for. We can't write parsers for JSON, XML, YAML etc. (or validate 3rd party ones) we need .NET to do that. A module which uses a community parser needs to be a community module.
    • .NET team We don't see the need to support every markup as it is invented, and there are good community libraries.

    and customers like the OP say they don't want "community" stuff they want everything to come from Microsoft. (Though from the use of "M$" I assume the OP doesn't like paying for it).

  3. ghost closed this as completedon Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.Resolution-DuplicateThe issue is a duplicate.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions