Add more build-info functions to c-api - #8216
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughPublicizes build metadata in ChangesBuild metadata C API exposure
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/capi/src/pylifecycle.rs`:
- Around line 84-115: The four getter functions are duplicated and should be
refactored into a macro-based helper. Extract the shared CString/LazyLock/as_ptr
logic into a single reusable macro or helper and parameterize only the differing
sys constant, static identifier, and panic text for Py_GetBuildInfo,
Py_GetCompiler, Py_GetCopyright, and Py_GetPlatform. Keep the public extern "C"
function names unchanged and apply the same pattern consistently if
Py_GetVersion or similar getters in pylifecycle.rs use the same structure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: d582c5db-c613-42ea-a2b7-5f7d60708967
📒 Files selected for processing (2)
crates/capi/src/pylifecycle.rscrates/vm/src/stdlib/sys.rs
44e1a4c to
c567388
Compare
2670157 to
141d0f4
Compare
141d0f4 to
7881dfd
Compare
Co-authored-by: Jeong, YunWon <[email protected]>
1e6c6b0 to
b5fd405
Compare
Summary by CodeRabbit
sysmetadata constants with consistent string handling.strto better represent system metadata reliably.