You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expectation here is to preserve the original file and not to add the extra !!merge tag
This results in the following error in vscode : Unresolved tag: tag:yaml.org,2002:mergeYAML
I haven't found any reference of this tag in yamlfmt, good chance it comes directly from gopkg.in/yaml.v3
About !!merge, it shows up in this reference : https://yaml.org/type/merge.html
I think it kind of makes sense; << on its own could technically be ambiguously a literal string or a merge operator. But I think it's a pretty silly reason to always include it in the representation for that reason, because I can't imagine a scenario where someone would use << and wouldn't mean !!merge.
I'll try and add an option for this in the yaml library, not sure what I'll call it yet but probably along the lines of assume_merge_operator that will deliberately drop the merge tag from the representation. I can get it in the next release that I'm planning for this weekend.
Considering the following yaml file :
Formatting with
yamlfmt
returns this :The expectation here is to preserve the original file and not to add the extra
!!merge
tagThis results in the following error in vscode :
Unresolved tag: tag:yaml.org,2002:mergeYAML
I haven't found any reference of this tag in
yamlfmt
, good chance it comes directly fromgopkg.in/yaml.v3
About
!!merge
, it shows up in this reference : https://yaml.org/type/merge.htmlEdit : it seems it does come from
gopkg.in/yaml.v3
indeed : https://go.dev/play/p/DSNN-bUHCIhThe text was updated successfully, but these errors were encountered: