go.mod: update library gopkg.in/yaml.v3 to github.com/braydonk/yaml#4448
Conversation
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
wbreza
left a comment
There was a problem hiding this comment.
Looks like it supports the same inline struct descriptions and same interfaces for marshalling and unmarshalling. So if it give us more/better yaml features then this looks great!
Update library gopkg.in/yaml.v3 to github.com/braydonk/yaml.
In upcoming features for azd, we will start round-tripping YAML by marshaling and unmarshaling text. When YAML is round-tripped this way using the current gopkg.in/yaml.v3 library, certain textual characteristic is lost.
Round-tripping differences
Multi-line blocks:
When marshaled, then unmarshaled, results in:
Sequences:
When marshaled, then unmarshaled, results in:
i.e. Sequences are always indented once.
Fortunately, github.com/braydonk/yaml is a fork of gopkg.in/yaml.v3 that powers yamlfmt, a popular tool for formatting YAML. The fork has minor feature additions to support these formatting use-cases.
We will likely need additional functionality in the future that we can consider contributing upstream.