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

v3: Enabled shallow merge when unmarshal to struct. #826

Closed
wants to merge 1 commit into from

Conversation

mattaldenshaw
Copy link

This creates a flag called "shallowMerge" in the decoder to force the merge to be shallow when unmarshalling from yaml to struct. It will fix issue #818 @niemeyer

@mattaldenshaw mattaldenshaw changed the title Enabled shallow merge when unmarshal to struct. v3: Enabled shallow merge when unmarshal to struct. Mar 1, 2022
niemeyer added a commit that referenced this pull request May 12, 2022
This addresses a number of related issues on how merge tags
were handled, most notably the case of nested mappings being
merged instead of the outermost value being used as-is.

Closes: #818 #826
@niemeyer
Copy link
Contributor

As we discussed on the call, the proper solution to this problem is to make the decoder behave correctly per the specification and the other popular parsers, all the time. Decoding a document containing a merge should be no different than decoding a simpler document that results from the merge operations themselves, for all purposes.

I believe I've addressed that in 539c8e7.

Please let me know if you see any issues there.

@niemeyer niemeyer closed this May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants