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

Unclosed inline map fails entire document silently #43

Closed
bobkocisko opened this issue Apr 20, 2021 · 3 comments · Fixed by #50
Closed

Unclosed inline map fails entire document silently #43

bobkocisko opened this issue Apr 20, 2021 · 3 comments · Fixed by #50
Assignees
Labels
Milestone

Comments

@bobkocisko
Copy link

Hello! Thanks for this great library! I'm using this from Elixir and came across this issue:

Interactive Elixir (1.11.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :yamerl_constr.string("{a: 2}")
[[{'a', 2}]]
iex(2)> :yamerl_constr.string("{a: 2")  
[]
iex(3)>

Normally parse errors throw an exception but no exception is thrown here.

Yamler version 0.8.1

dumbbell added a commit that referenced this issue Jan 10, 2022
An example YAML document is: `{a: 1`. This now triggers a parsing error.

Fixes #43.
@dumbbell
Copy link
Collaborator

Hi!

Thank you for the bug report! I prepared a patch in the pull request mentionned above. Does it work for you?

@dumbbell dumbbell self-assigned this Jan 10, 2022
@dumbbell dumbbell added the bug label Jan 10, 2022
@bobkocisko
Copy link
Author

Very cool! I can't try it just now but I'll let you know as soon as I get back to that (may be a few months)

@dumbbell dumbbell added this to the v0.9.0 milestone Jan 13, 2022
@dumbbell
Copy link
Collaborator

Let's be optimistic :-) I merged the patch and will cut a release shortly. If you still hit a problem, please re-open this issue!

dumbbell added a commit that referenced this issue 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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants