feat(lua): reuse origin slices for materialized encode#129
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR extends lua-qjson's table materialization and encoding with optional provenance tracking and origin-aware byte reuse. A new ChangesOrigin-aware materialization and encoding
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
qjson.materialize(value, { keep_origin = true })provenance metadataqjson.encodeto reuse safe original string/container slices for provenance-backed materialized tablesCloses #128
Test Plan
make build && DYLD_LIBRARY_PATH="$PWD/target/release" LUA_PATH='./lua/?.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;;' LUA_CPATH='./vendor/lua-cjson/?.so;./target/release/lib?.dylib;./target/release/lib?.so;./?.so;/usr/local/openresty/lualib/?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so' PATH="$HOME/.luarocks/bin:$PATH" busted --lua=$(command -v luajit) tests/lua/origin_materialize_spec.lua --lpath='./lua/?.lua'PATH="$HOME/.luarocks/bin:$PATH" make testmake linteval "$(luarocks --lua-version=5.1 --tree /tmp/lua-qjson-luacheck-5.1 path)" && luacheck lua tests/luacargo test --release --no-default-featuresSummary by CodeRabbit
New Features
Tests