8000 feat(err): add JSONExtract to the rust hogvm by oliverb123 · Pull Request #33607 · PostHog/posthog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(err): add JSONExtract to the rust hogvm #33607

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

Merged
merged 8 commits into from
Jun 12, 2025
Merged

Conversation

oliverb123
Copy link
Contributor
@oliverb123 oliverb123 commented Jun 12, 2025

Also makes unknown globals be treated as Null's, rather than returning an error.

The easiest way to tell that this does what it's supposed to is by looking at the test programs, for reviewers

@oliverb123 oliverb123 requested review from daibhin, a team and hpouillot June 12, 2025 13:53
Copy link
Contributor
@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Major refactoring of the HogVM implementation in Rust, adding JSONExtract functionality and changing error handling behavior for unknown globals.

  • Added construct_free_standing function in rust/common/hogvm/src/values.rs to create HogValues from JSON without VM heap access
  • Modified native function system in rust/common/hogvm/src/context.rs to improve heap allocation handling through the new walk_emplacing utility
  • Changed unknown global variable handling in rust/common/hogvm/src/vm.rs to return Null instead of errors for more flexible runtime behavior
  • Added JSONExtract to RUST_HOGVM_STL array in posthog/models/error_tracking/hogvm_stl.py for parsing nested JSON values

9 files reviewed, 6 comments
Edit PR Review Bot Settings | Greptile

@oliverb123 oliverb123 enabled auto-merge (squash) June 12, 2025 14:47
@oliverb123 oliverb123 merged commit 177aafb into master Jun 12, 2025
97 checks passed
@oliverb123 oliverb123 deleted the err/rust-jsonextract branch June 12, 2025 15:00
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.

2 participants
0