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

issue #39: dont allow duplicate keys for maps #40

Closed
wants to merge 2 commits into from

Conversation

slezakattack
Copy link
Contributor

No description provided.

Copy link
Collaborator

@dumbbell dumbbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! Sorry for the delay, I didn't notice the pull request...

I added a few comments to the patch.

src/yamerl_node_map.erl Outdated Show resolved Hide resolved
src/yamerl_node_map.erl Outdated Show resolved Hide resolved
src/yamerl_node_map.erl Outdated Show resolved Hide resolved
@slezakattack
Copy link
Contributor Author

Thank you so much for your feedback. I'll work on updating this to include your suggestions.

…cs for map_builder record. Refactored set_kv and associated functions
@dumbbell dumbbell self-assigned this Jan 10, 2022
@dumbbell
Copy link
Collaborator

I squashed your commits and wrapped some lines in yamerl_node_map.erl. The result is in commit 24785f0 which I just merged.

GitHub didn't allow me to create a pull request with the updated branch and I can't update this pull request either. So I'm going to close this pull request but the patch was merged into master! Sorry for the confusion :)

@dumbbell dumbbell closed this Jan 10, 2022
@dumbbell dumbbell reopened this Jan 10, 2022
@dumbbell dumbbell closed this Jan 10, 2022
dumbbell added a commit that referenced this pull request Jan 13, 2022
This brings several bug fixes, including one which is a change of
behavior:

* @slezakattack implemented key deduplication in the construction of
  mappings, both when using proplists and maps (#39, #40).
* Report a parsing error if a block collection is unfinished when the
  end of the document is reached; e.g. when a `]` or `}` character is
  missing (#43, #50).
* Fix parsing of indented block scalar when they are finished by a
  document or directives end marker (#41, #51).

@kianmeng also fixed several typos (#47).

The Rebar configuration was updated to work with recent versions. While
working on that, the CI was switched from Travis to GitHub Actions.

Thank you to all contributors for their reports & patches!
dumbbell added a commit that referenced this pull request Jan 28, 2022
This introduces one new feature: it is now possible to keep duplicate
keys in mappings with the option `{keep_duplicate_keys, boolean()}`
(#52, #53). This flag restores the behavior yamerl had before the 0.9.0
release and the merge of #40.

Thank you to @flurin for his contribution!
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.

None yet

2 participants