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

Add parsing functions that return failure information #58

Merged

Conversation

sgallagher
Copy link
Collaborator

New Objects:

  • Modulemd.Subdocument

New functions:

  • Modulemd.objects_from_file_ext()
  • Modulemd.objects_from_string_ext()
  • Modulemd.objects_from_stream_ext()
  • Modulemd.Defaults.new_from_file_ext()
  • Modulemd.Defaults.new_from_string_ext()
  • Modulemd.Defaults.new_from_stream_ext()
  • Modulemd.Module.new_from_file_ext()
  • Modulemd.Module.new_from_string_ext()
  • Modulemd.Module.new_from_stream_ext()

These functions will return an array of Modulemd.Subdocument
objects that includes a GError explaining the failure as well as
the YAML string that failed (or at least as much of it as libyaml
was able to read).

Fixes: #47

cc @dmach @hanzz

Signed-off-by: Stephen Gallagher sgallagh@redhat.com

@sgallagher sgallagher added enhancement SEMVER_MINOR Adds new API to the library but does not change any existing interfaces labels Apr 20, 2018
@sgallagher sgallagher added this to the 1.4.0 milestone Apr 20, 2018
@sgallagher sgallagher self-assigned this Apr 20, 2018
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
New functions:
 * Modulemd.objects_from_file_ext()
 * Modulemd.objects_from_string_ext()
 * Modulemd.objects_from_stream_ext()
 * Modulemd.Defaults.new_from_file_ext()
 * Modulemd.Defaults.new_from_string_ext()
 * Modulemd.Defaults.new_from_stream_ext()
 * Modulemd.Module.new_from_file_ext()
 * Modulemd.Module.new_from_string_ext()
 * Modulemd.Module.new_from_stream_ext()

These functions will return an array of Modulemd.Subdocument
objects that includes a GError explaining the failure as well as
the YAML string that failed (or at least as much of it as libyaml
was able to read).

Fixes: fedora-modularity#47

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
@dmach
Copy link

dmach commented Apr 25, 2018

@sgallagher I think the patch is good.

@sgallagher sgallagher merged commit 9ac33fb into fedora-modularity:master Apr 25, 2018
@sgallagher sgallagher deleted the parser-with-error-reporting branch April 25, 2018 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement SEMVER_MINOR Adds new API to the library but does not change any existing interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants