Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Perform strict unmarshaling of YAML data #8428

wants to merge 1 commit into from

Conversation

jmooring
Copy link
Member

Fixes #8427

@jmooring
Copy link
Member Author

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.

@jmooring
Copy link
Member Author

jmooring commented Apr 16, 2021

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: []
Copy link
Member

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 }}

Copy link
Member Author

@jmooring jmooring Apr 20, 2021

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.

Copy link
Member

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.

@jmooring
Copy link
Member Author

Should we just close this PR and wait for v3 of the YAML package?

@jmooring
Copy link
Member Author

Revisit #8427 once #8822 is complete.

@jmooring jmooring closed this Jul 29, 2021
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

different behavior on the same config file but with different format
2 participants