Conversation
The emitter already implements importHelpers end to end
(EmitOptions.import_helpers, HelperStyle selection in transform_view,
tslib import/require emission in emitter/helpers.rs), but tsconfig had
no CompilerOptions field for it, so the key was silently dropped on
both the CLI and worker paths and helpers were always inlined.
Replicate the landed useDefineForClassFields plumbing shape:
- project.rs: tri-state Option<bool> field, parse arm, accessor,
tri-state parse test
- program.rs: ResolvedProgram carry and accessor
- emitter.rs: apply_emit_fields takes import_helpers set-when-Some
- pipeline.rs, project/effective.rs: forward on both emit paths
- check_cells.rs: worker build_tsconfig bool list + camelCase remap so
@importHelpers serializes as a typed boolean "importHelpers" key
Verified: fmt --check, check, bamts-compiler lib 2007/0,
bamts-verification lib 696/0, clippy --all-targets -D warnings,
diagnostics regenerate --check PASS. CLI smoke: es2015 commonjs async
fn emits require("tslib").__awaiter with importHelpers:true and the
inline helper body with importHelpers:false.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (9)
🧰 Additional context used🔍 Remote MCP Context7Relevant review context
🔇 Additional comments (7)
📝 SummarySummary by CodeRabbit
WalkthroughChangesThe compiler now parses the tri-state Import helpers option
Sequence Diagram(s)sequenceDiagram
participant ProjectConfig
participant CompilerOptions
participant ResolvedProgram
participant EmitOptions
ProjectConfig->>CompilerOptions: Parse importHelpers
CompilerOptions->>ResolvedProgram: Store import_helpers
ResolvedProgram->>EmitOptions: Pass import_helpers
EmitOptions->>EmitOptions: Apply import_helpers
Merge Risk: ⚪ Minimal · up to The importHelpers option is propagated through the compiler and verification paths without an identified merge-blocking regression. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
✨ Simplify code
Warning source "Github Grep" unavailable: no selected tools are declared read-only by the MCP server source "Sequential Thinking" unavailable: no selected tools are declared read-only by the MCP server source "Github Grep" unavailable: no selected tools are declared read-only by the MCP server source "Sequential Thinking" unavailable: no selected tools are declared read-only by the MCP server 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
The emitter already implements
importHelpersend to end (EmitOptions.import_helpers,HelperStyleselection intransform_view, tslib import/require emission inemitter/helpers.rs), but the tsconfig key never reached it:CompilerOptionshad no field, soimportHelpers: truewas silently dropped on both the CLI and worker paths and helpers were always inlined.This replicates the landed
useDefineForClassFieldsplumbing shape forimportHelpers:project.rs: tri-stateOption<bool>field, parse arm, accessor, tri-state parse testprogram.rs:ResolvedProgramcarry + accessoremitter.rs:apply_emit_fieldsacceptsimport_helpers, set-when-Somepipeline.rs/project/effective.rs: forward on both emit pathscheck_cells.rs: workerbuild_tsconfigbool list + camelCase remap, so@importHelpers: trueserializes as a typed boolean"importHelpers": trueVerification
cargo fmt --all --checkcargo check -p bamts-compiler -p bamts-verificationcargo test -p bamts-compiler --lib— 2007 passed, 0 failedcargo test -p bamts-verification --lib— 696 passed, 0 failedcargo clippy -p bamts-compiler -p bamts-verification --all-targets -- -D warningscargo run -p bamts-verification -- diagnostics regenerate --check— PASSrequire("tslib").__awaiterwithimportHelpers: true, and the inline__awaiterbody withimportHelpers: falsePer repository discipline, conformance-row conversions (the 877 pinned helper-policy rows noted in
.outline/GATES.mdPLUMBING-RESULTS) are not claimed here; they are measured at the next sweep.