From aee66fb9af7b75dda5aa0e8a2138e0999590f08c Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Fri, 10 Jan 2025 09:28:21 -0800 Subject: [PATCH] Un-deprecate non-strict YAML We still warn the user because it could be due to typos, but we no longer threaten to make strict mode the default. Allowing non-strict YAML is very useful for maintainers switching between feature branches. Failing on non-strict YAML would make it hard to e.g. delete instances that have been created by a different branch that introduces a new field. Signed-off-by: Jan Dubois --- pkg/limayaml/marshal.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/limayaml/marshal.go b/pkg/limayaml/marshal.go index 9e390b632e3..4a4cf02f907 100644 --- a/pkg/limayaml/marshal.go +++ b/pkg/limayaml/marshal.go @@ -45,9 +45,7 @@ func Unmarshal(data []byte, v interface{}, comment string) error { return fmt.Errorf("failed to unmarshal YAML (%s): %w", comment, err) } if err := yaml.UnmarshalWithOptions(data, v, yaml.Strict(), yaml.CustomUnmarshaler[Disk](unmarshalDisk)); err != nil { - logrus.WithField("comment", comment).WithError(err).Warn("Non-strict YAML is deprecated and will be unsupported in a future version of Lima") - // Non-strict YAML is known to be used by Rancher Desktop: - // https://github.com/rancher-sandbox/rancher-desktop/blob/c7ea7508a0191634adf16f4675f64c73198e8d37/src/backend/lima.ts#L114-L117 + logrus.WithField("comment", comment).WithError(err).Warn("Non-strict YAML detected; please check for typos") } return nil }