Skip to content

chore(sdkgen): rename baml_codegen_types to baml_sdkgen_types - #5005

Merged
sxlijin merged 1 commit into
canaryfrom
sxlijin/sdkgen-rename-sdkgen-types
Sep 28, 2026
Merged

sxlijin merged 1 commit into
canaryfrom
sxlijin/sdkgen-rename-sdkgen-types

Conversation

@sxlijin

@sxlijin sxlijin commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Using "sdkgen" for generating baml_sdk and "codegen" for generating bytecode makes it easier to a priori distinguish what code does what.

@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
developer-docs Ready Ready Preview Sep 27, 2026 8:45pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 2d32aa04-0d2f-419c-9f96-4d6e215f5ee3

📥 Commits

Reviewing files that changed from the base of the PR and between 245e28b and 89d30d0.

⛔ Files ignored due to path filters (2)
  • baml_language/Cargo.lock is excluded by !**/*.lock
  • baml_language/architecture/architecture.svg is excluded by !**/*.svg
📒 Files selected for processing (88)
  • baml_language/Cargo.toml
  • baml_language/FUNCTION_SPEC_STREAMING_DESIGN.md
  • baml_language/crates/baml_cli/Cargo.toml
  • baml_language/crates/baml_cli/src/commands.rs
  • baml_language/crates/baml_cli/src/generate.rs
  • baml_language/crates/baml_cli/tests/exit_code_e2e.rs
  • baml_language/crates/baml_ide/Cargo.toml
  • baml_language/crates/baml_ide/src/symbol_pool.rs
  • baml_language/crates/baml_sdkgen_types/Cargo.toml
  • baml_language/crates/baml_sdkgen_types/src/errors.rs
  • baml_language/crates/baml_sdkgen_types/src/generator_fields.rs
  • baml_language/crates/baml_sdkgen_types/src/lib.rs
  • baml_language/crates/baml_sdkgen_types/src/output_writer.rs
  • baml_language/crates/baml_sdkgen_types/src/routing.rs
  • baml_language/crates/baml_sdkgen_types/src/string_literal.rs
  • baml_language/crates/baml_sdkgen_types/src/symbols.rs
  • baml_language/crates/baml_sdkgen_types/src/ty.rs
  • baml_language/crates/baml_sdkgen_types/src/type_queries.rs
  • baml_language/sdk_tests/codegen/Cargo.toml
  • baml_language/sdk_tests/codegen/src/go.rs
  • baml_language/sdk_tests/codegen/src/lib.rs
  • baml_language/sdks/agent-docs/bridge-ref/ref-java-packaging.md
  • baml_language/sdks/cpp/sdkgen_cpp/Cargo.toml
  • baml_language/sdks/cpp/sdkgen_cpp/src/lib.rs
  • baml_language/sdks/cpp/sdkgen_cpp/src/naming.rs
  • baml_language/sdks/csharp/sdkgen_csharp/Cargo.toml
  • baml_language/sdks/csharp/sdkgen_csharp/src/lib.rs
  • baml_language/sdks/csharp/sdkgen_csharp/src/model.rs
  • baml_language/sdks/csharp/sdkgen_csharp/src/names.rs
  • baml_language/sdks/csharp/sdkgen_csharp/src/normalize.rs
  • baml_language/sdks/csharp/sdkgen_csharp/src/output.rs
  • baml_language/sdks/csharp/sdkgen_csharp/src/pipeline.rs
  • baml_language/sdks/csharp/sdkgen_csharp/src/routing.rs
  • baml_language/sdks/csharp/sdkgen_csharp/src/semantic.rs
  • baml_language/sdks/go/sdkgen_go/Cargo.toml
  • baml_language/sdks/go/sdkgen_go/src/lib.rs
  • baml_language/sdks/go/sdkgen_go/src/names.rs
  • baml_language/sdks/go/sdkgen_go/src/packages.rs
  • baml_language/sdks/go/sdkgen_go/src/types.rs
  • baml_language/sdks/java/sdkgen_java/Cargo.toml
  • baml_language/sdks/java/sdkgen_java/src/emit.rs
  • baml_language/sdks/java/sdkgen_java/src/lib.rs
  • baml_language/sdks/java/sdkgen_java/src/routing.rs
  • baml_language/sdks/java/sdkgen_java/src/translate_ty.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/Cargo.toml
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/emit/class.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/emit/enum_.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/emit/function.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/emit/method.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/emit/mod.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/emit/type_alias.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/leaf.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/lib.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/names.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/routing.rs
  • baml_language/sdks/python/rust/sdkgen_python_pydantic2/src/translate_ty.rs
  • baml_language/sdks/rust/sdkgen_rust/Cargo.toml
  • baml_language/sdks/rust/sdkgen_rust/src/analyze.rs
  • baml_language/sdks/rust/sdkgen_rust/src/effect_rename.rs
  • baml_language/sdks/rust/sdkgen_rust/src/emit/class.rs
  • baml_language/sdks/rust/sdkgen_rust/src/emit/enum_.rs
  • baml_language/sdks/rust/sdkgen_rust/src/emit/function.rs
  • baml_language/sdks/rust/sdkgen_rust/src/emit/type_alias.rs
  • baml_language/sdks/rust/sdkgen_rust/src/emit/union.rs
  • baml_language/sdks/rust/sdkgen_rust/src/host_types.rs
  • baml_language/sdks/rust/sdkgen_rust/src/lib.rs
  • baml_language/sdks/rust/sdkgen_rust/src/routing.rs
  • baml_language/sdks/rust/sdkgen_rust/src/translate_ty.rs
  • baml_language/sdks/rust/sdkgen_rust/src/unions.rs
  • baml_language/sdks/swift/rust/sdkgen_swift/Cargo.toml
  • baml_language/sdks/swift/rust/sdkgen_swift/src/diagnostics.rs
  • baml_language/sdks/swift/rust/sdkgen_swift/src/emit.rs
  • baml_language/sdks/swift/rust/sdkgen_swift/src/lib.rs
  • baml_language/sdks/swift/rust/sdkgen_swift/src/translate_ty.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/Cargo.toml
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/emit/class.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/emit/enum_.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/emit/function.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/emit/method.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/emit/mod.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/emit/type_alias.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/emit/typemap_file.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/leaf.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/lib.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/routing.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/sdkgen_typescript.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/sdkgen_typescript_web.rs
  • baml_language/sdks/typescript/sdkgen_typescript_shared/src/translate_ty.rs
💤 Files with no reviewable changes (9)
  • baml_language/crates/baml_sdkgen_types/src/generator_fields.rs
  • baml_language/crates/baml_sdkgen_types/src/type_queries.rs
  • baml_language/crates/baml_sdkgen_types/src/lib.rs
  • baml_language/crates/baml_sdkgen_types/src/string_literal.rs
  • baml_language/crates/baml_sdkgen_types/src/ty.rs
  • baml_language/crates/baml_sdkgen_types/src/output_writer.rs
  • baml_language/crates/baml_sdkgen_types/src/errors.rs
  • baml_language/crates/baml_sdkgen_types/src/symbols.rs
  • baml_language/crates/baml_sdkgen_types/src/routing.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • baml_language/sdks/agent-docs/bridge-ref/ref-java-packaging.md
  • baml_language/FUNCTION_SPEC_STREAMING_DESIGN.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The shared types crate is renamed from baml_codegen_types to baml_sdkgen_types. Workspace dependencies, CLI and IDE references, SDK generators, tests, and related documentation now use the new crate name. The summaries report no changes to generation behavior.

Changes

SDK types crate migration

Layer / File(s) Summary
Rename the crate and update workspace consumers
baml_language/Cargo.toml, baml_language/crates/*, baml_language/crates/baml_cli/*, baml_language/crates/baml_ide/*, baml_language/sdk_tests/codegen/*, baml_language/sdks/agent-docs/*
The crate package name and workspace dependency change to baml_sdkgen_types. The CLI, IDE, SDK tests, and related documentation use the new name.
Update SDK generators
baml_language/sdks/cpp/*, baml_language/sdks/csharp/*, baml_language/sdks/go/*, baml_language/sdks/java/*, baml_language/sdks/python/rust/sdkgen_python_pydantic2/*, baml_language/sdks/rust/*, baml_language/sdks/swift/rust/*, baml_language/sdks/typescript/*
The SDK generator dependencies, imports, type references, public re-exports, and test fixtures use baml_sdkgen_types. The summaries describe generation logic and test expectations as unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Refactor

Possibly related PRs

  • BoundaryML/baml#4048: Updates the shared types and APIs that this change renames and migrates across consumers.

Suggested reviewers: aaronvg, 2kai2kai2

Merge Risk: ⚪ Minimal · up to 89d30

This crate rename updates the active workspace references, with no remaining old-name build references found. No concrete merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 4 | ❓ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ❓ Inconclusive Docstring coverage is 49.23% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 130 functions across 50 files. (29 skippe… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: renaming baml_codegen_types to baml_sdkgen_types across the SDK generator codebase.
Full details: Docstring Coverage

Explanation

Docstring coverage is 49.23% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 130 functions across 50 files. (29 skipped: 15 unsupported, 14 over the file limit.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

A rabbit checks the crate’s new name,
And hops through each import just the same.
The SDKs now point anew,
Their tests and references too.
No changed output joins the game.

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

@sxlijin
sxlijin added this pull request to stack #5007 September 26, 2026 21:16
@github-actions

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Binary size checks failed

❌ 2 violations · ✅ 1 passed

⚠️ Please fix the size gate issues or acknowledge them by updating baselines.

Artifact Platform File Gzip Gated on Baseline Delta Status
✅ baml-cli Linux 🔒 54.7 MB 22.6 MB file 73.1 MB -18.4 MB (-25.2%) OK
❌ packed-program Linux 🔒 39.9 MB 15.8 MB file 28.9 MB +11.0 MB (+37.8%) FAIL
❌ bridge_wasm WASM 28.1 MB 🔒 7.8 MB gzip 5.8 MB +2.0 MB (+35.5%) FAIL

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.

Details & how to fix

Violations:

  • packed-program (Linux) file_bytes: 39.9 MB exceeds limit of 29.8 MB (exceeded by +10.1 MB, policy: max_file_bytes)
  • packed-program (Linux) file_delta_pct: +37.8% exceeds limit of 3.0% (exceeded by +34.8pp, policy: max_delta_pct)
  • bridge_wasm (WASM) gzip_bytes: 7.8 MB exceeds limit of 5.9 MB (exceeded by +1.9 MB, policy: max_gzip_bytes)
  • bridge_wasm (WASM) gzip_delta_pct: +35.5% exceeds limit of 3.0% (exceeded by +32.5pp, policy: max_delta_pct)

Add/update baselines:

.ci/size-gate/wasm32-unknown-unknown.toml:

[artifacts.bridge_wasm]
file_bytes = 28133372
gzip_bytes = 7816721

.ci/size-gate/x86_64-unknown-linux-gnu.toml:

[artifacts.packed-program]
file_bytes = 39891064
gzip_bytes = 15796053

Generated by cargo size-gate · workflow run

@sxlijin sxlijin changed the title Rename baml_codegen_types to baml_sdkgen_types refactor(sdkgen): rename baml_codegen_types to baml_sdkgen_types Sep 26, 2026
@sxlijin
sxlijin marked this pull request as ready for review September 26, 2026 23:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T23:38:12.877546Z 85ab407 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

"Codegen" is reserved for bytecode codegen; the shared types behind the
BAML SDK generators are sdkgen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@blacksmith-sh

This comment has been minimized.

@sxlijin
sxlijin force-pushed the sxlijin/sdkgen-rename-sdkgen-types branch from 245e28b to 89d30d0 Compare September 27, 2026 20:43
@sxlijin sxlijin changed the title refactor(sdkgen): rename baml_codegen_types to baml_sdkgen_types chore(sdkgen): rename baml_codegen_types to baml_sdkgen_types Sep 28, 2026
@sxlijin
sxlijin added this pull request to the merge queue Sep 28, 2026
Merged via the queue into canary with commit 340b908 Sep 28, 2026
97 checks passed
@sxlijin
sxlijin deleted the sxlijin/sdkgen-rename-sdkgen-types branch September 28, 2026 06:49

This branch was successfully deployed

1 active deployment
Preview – developer-docs — 89d30d04 Deployed Sep 27, 2026 by vercel[bot]
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