-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Perform strict unmarshaling of YAML data #8428
Conversation
Feel free to reject this PR if you feel it will be a breaking change. Sometimes the right thing to do isn't the right thing to do. |
Yeah, so, the docs site failed to build because 4 pages had some empty duplicate keys. If our own site is any indication of what would happen in the field, this is a breaking change. I've cleaned up the docs site with gohugoio/hugoDocs#1420. |
@@ -2,7 +2,6 @@ | |||
title: lang.NumFmt | |||
description: "Formats a number with a given precision using the requested `negative`, `decimal`, and `grouping` options. The `options` parameter is a string consisting of `<negative> <decimal> <grouping>`." | |||
godocref: "" | |||
workson: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this fails with strict unmarshalling? That could be a breaking change. I suspect some may have constructs ala:
{{ range .Params.workson }}
{{ end }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It failed when there were duplicate keys, which I removed from the docs site and this repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, OK, so it's not the empty slice that triggers the error.
Should we just close this PR and wait for v3 of the YAML package? |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #8427