Skip to content

feat: support new runtimes in ir crate#230

Merged
ChefBingbong merged 1 commit intomainfrom
feat-support-new-runtimes-in-ir-crate
Feb 25, 2026
Merged

feat: support new runtimes in ir crate#230
ChefBingbong merged 1 commit intomainfrom
feat-support-new-runtimes-in-ir-crate

Conversation

@ChefBingbong
Copy link
Copy Markdown
Contributor

@ChefBingbong ChefBingbong commented Feb 25, 2026

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-ir into a new poly-bench-ir-traits interface, and switches extract_imports to 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-traits as 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.

@ChefBingbong ChefBingbong merged commit 59a8eff into main Feb 25, 2026
@ChefBingbong ChefBingbong deleted the feat-support-new-runtimes-in-ir-crate branch February 25, 2026 23:12
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

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.

1 participant