feat: support new runtimes in ir crate#230
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on March 22
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| Self { imports, body } | ||
| } | ||
|
|
||
| /// Create a ParsedSetup with no imports (passthrough) |
There was a problem hiding this comment.
Import extractors registry is never initialized
High Severity
The EXTRACTORS static is never populated because init_import_extractors() (defined in poly-bench-runtime/src/registry.rs) is exported but never called anywhere in the codebase. This means extract_imports always takes the None branch and returns ParsedSetup::passthrough(setup) — silently discarding all language-specific import extraction (Go, TypeScript, Rust, Python) that previously worked via hardcoded extractors. Every call to ir::lower (four sites in cli/main.rs) will produce IR with empty imports.


Auto-generated PR from staged changes.
Note
Medium Risk
Behavior changes from always parsing imports for supported languages to requiring runtime registration; if registration is missed or incomplete, generated code may silently lose import extraction.
Overview
Moves setup-block import parsing out of
poly-bench-irinto a newpoly-bench-ir-traitsinterface, and switchesextract_importsto use a runtime-registered extractor registry (set_import_extractors) instead of built-in Go/TS/Rust/Python parsing.Removes the in-crate language-specific extractors and their tests, updates re-exports accordingly, and adds
poly-bench-ir-traitsas a dependency; if no extractors are registered, import extraction now falls back to passthrough (no imports extracted).Written by Cursor Bugbot for commit 3fec6f4. This will update automatically on new commits. Configure here.