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

clean up yaml memory offset overrides #7931

Merged
merged 1 commit into from
Jun 2, 2023
Merged

clean up yaml memory offset overrides #7931

merged 1 commit into from
Jun 2, 2023

Conversation

tpetr
Copy link
Collaborator

@tpetr tpetr commented May 31, 2023

  • Isolates and hopefully clarifies my yaml memory offset hack
  • Re-adds print_event() to libyaml so that others can inspect the struct offsets in the future

This discussion thread has convinced me that the right solution here is to cross-compile, but my opam-fu is weak, so let's continue rolling with my gross hack in the short-term and we can revisit once the dust settles (thanks @yallop for the tips)

test plan:

  • dune build && make test
  • confirm js/examples/yaml.html works

@tpetr tpetr requested a review from aryx June 1, 2023 14:43
@tpetr tpetr unassigned aryx Jun 1, 2023
@@ -11,3 +11,82 @@ YAML_DECLARE(int)
get_sizeof_yaml_event_t() {
return sizeof(yaml_event_t);
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

would be nice to add a comment about extra.c in the README about your modification
and what is the purpose of this mysterious print_event.

@aryx aryx merged commit bed9c0d into develop Jun 2, 2023
40 checks passed
@aryx aryx deleted the tom/fix-yaml3 branch June 2, 2023 09:04
tpetr added a commit that referenced this pull request Jun 5, 2023
YAML parsing was fixed in
#7918 and
#7931, but I didn't catch
that node start/end positions were incorrect. This was because in
`ctypes_read()` we were returning a JS int when we should have been
returning `UInt32` instead.

test plan:
- confirmed locally that the playground works properly w/ a yaml pattern
- added unit test to confirm yaml check works and returns correct
positions
- `dune build && make test` succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants