Skip to content

Conversation

@glihm
Copy link
Collaborator

@glihm glihm commented Sep 9, 2025

Summary by CodeRabbit

  • Refactor

    • Simplified binding generation by removing the legacy TypeScript v2 target, unifying support under the standard TypeScript option.
  • Chores

    • Removed the corresponding CLI flag and any configuration paths related to TypeScript v2.
    • Eliminated the deprecated TypeScript v2 plugin and its references across the build and generation flow.
  • User Impact

    • The “TypeScript v2” binding target is no longer available. Use the standard “TypeScript” target for code generation.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 9, 2025

Ohayo, sensei!

Walkthrough

Removed TypeScript V2 support across CLI and bindgen. Deleted the TypeScript V2 plugin module, removed its enum variants, module exports, CLI flags/args, and plugin wiring. Remaining TypeScript flow now routes solely through the existing Typescript plugin.

Changes

Cohort / File(s) Summary
CLI targets cleanup
bin/sozo/src/commands/bindgen.rs
Removed BindingTarget::TypescriptV2 and its mapping to BuiltinPlugins::TypeScriptV2.
CLI build args cleanup
bin/sozo/src/commands/build.rs
Removed BuildArgs.typescript_v2 flag, its Clap arg, default init, and runtime handling.
Bindgen plugin manager
crates/dojo/bindgen/src/lib.rs
Removed BuiltinPlugins::TypeScriptV2 import/variant handling from PluginManager::generate.
Plugins registry
crates/dojo/bindgen/src/plugins/mod.rs
Deleted pub mod typescript_v2, removed BuiltinPlugins::TypeScriptV2 variant and Display mapping.
TypeScript V2 plugin removal
crates/dojo/bindgen/src/plugins/typescript_v2/mod.rs
Deleted entire TypeScript V2 plugin: public struct, constructor, generator logic, BuiltinPlugin impl, and tests.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Dev as Developer (CLI)
    participant Sozo as sozo build/bindgen
    participant PM as PluginManager
    participant TS as Typescript Plugin
    Note over Dev,TS: Post-change flow (TypeScript V2 removed)

    Dev->>Sozo: sozo bindgen/build --typescript
    Sozo->>PM: generate(BuiltinPlugins::Typescript)
    PM->>TS: generate_code(data)
    TS-->>PM: files (TS output)
    PM-->>Sozo: result
    Sozo-->>Dev: writes generated bindings
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks (1 passed, 1 warning, 1 inconclusive)

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description Check ❓ Inconclusive The pull request description was not provided, making it impossible to confirm whether it accurately describes the changeset or remains on-topic. Please add or update the pull request description to succinctly summarize the purpose and scope of the changes for reviewers.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title “refacto(bindgen): remove deprecated typescript_v2” directly reflects the main change of removing the deprecated TypeScript V2 support from the bindgen commands, is concise, and clearly communicates the intent of the pull request without extraneous details.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e7c8d97 and 1a0d63f.

📒 Files selected for processing (5)
  • bin/sozo/src/commands/bindgen.rs (0 hunks)
  • bin/sozo/src/commands/build.rs (0 hunks)
  • crates/dojo/bindgen/src/lib.rs (0 hunks)
  • crates/dojo/bindgen/src/plugins/mod.rs (0 hunks)
  • crates/dojo/bindgen/src/plugins/typescript_v2/mod.rs (0 hunks)
💤 Files with no reviewable changes (5)
  • bin/sozo/src/commands/bindgen.rs
  • crates/dojo/bindgen/src/plugins/mod.rs
  • crates/dojo/bindgen/src/lib.rs
  • crates/dojo/bindgen/src/plugins/typescript_v2/mod.rs
  • bin/sozo/src/commands/build.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: clippy
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/remove-deprecated-bindgen

Comment @coderabbitai help to get the list of available commands and usage tips.

@glihm glihm merged commit ff3dd6d into main Sep 9, 2025
10 checks passed
@glihm glihm deleted the fix/remove-deprecated-bindgen branch September 9, 2025 22:02
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.

2 participants