-
Notifications
You must be signed in to change notification settings - Fork 27
Apply libyaml
upstream changes
#97
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
base: main
Are you sure you want to change the base?
Conversation
Impressive, thank you so much. |
2f1b2ad
to
0b2698f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR applies upstream changes from libyaml
to the Go YAML library, incorporating multiple bug fixes and feature updates from the C library. The changes primarily focus on improving YAML parsing, validation, and emission behavior to align with upstream standards.
Key changes include:
- Added support for YAML version 1.2 directives alongside the existing 1.1 support
- Fixed parser state management for flow sequences and document handling
- Updated scanner logic for tag URIs and plain scalars to be more restrictive and correct
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
yts/known-failing-tests | Removed test cases that now pass due to upstream fixes |
yamlh.go | Added version directive tracking and end type enumeration for better document state management |
scannerc.go | Updated tag URI scanning logic and fixed plain scalar parsing restrictions |
parserc.go | Enhanced version directive support and improved flow sequence parsing |
encode.go | Updated to use new end type enumeration |
emitterc.go | Comprehensive updates to document emission logic and YAML version handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
0b2698f
to
353c1ef
Compare
@inteon Thanks for this. I amended each of your commits (and pushed them back to you) to add URLs pointing back to the libyaml commits to make it easier for people to review. I still need to review. |
FWIW, go-yaml was ported from libyaml which was ported from pyyaml. A goal of the org and this project is to see them all come into sync. It would be good to have tools to identify the current state of these things. |
I can't review all at once: comparing each Go commit to libyaml is an important effort. I would prefer separate PR for each. |
See: yaml/libyaml@9afa10a Signed-off-by: Tim Ramlot <[email protected]>
See: yaml/libyaml@fa1293a Signed-off-by: Tim Ramlot <[email protected]>
See: yaml/libyaml@3d5b7e6 Signed-off-by: Tim Ramlot <[email protected]>
See: yaml/libyaml@4e5cea6 Signed-off-by: Tim Ramlot <[email protected]>
See: yaml/libyaml@3694a4a Signed-off-by: Tim Ramlot <[email protected]>
See: yaml/libyaml@f41d360 Signed-off-by: Tim Ramlot <[email protected]>
See: yaml/libyaml@6e2fa97 Signed-off-by: Tim Ramlot <[email protected]>
Signed-off-by: Tim Ramlot <[email protected]>
See: yaml/libyaml@1008696 Signed-off-by: Tim Ramlot <[email protected]>
See: yaml/libyaml@588eabf See: yaml/libyaml@840b65c Signed-off-by: Tim Ramlot <[email protected]>
Signed-off-by: Tim Ramlot <[email protected]>
353c1ef
to
55d6f88
Compare
This is fair. @inteon Would you mind turning one or two of these commits into their own PR with one commit for each? You could do all of them but I don't want to waste your time if there ends up being a problem with all of them. Also could you copy the original merged libyaml PR text into the new PR? I know we have links to them, but probably better to have the text right there... Love this work btw! |
depends on #95
Apply the missing changes from upstream
libyaml
(see commit messages for individual changes). Additionally, in c47598a, I fixed the yts tests that started failing (on master, they were passing for the wrong reasons).Upstream commits: