Repository navigation
chore: delete watch - #4008
chore: delete watch#4008
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
⏭️ Performance benchmarks were skippedPerf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to To run them on this PR, do any of the following, then push a commit (or re-run CI):
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (13)
📒 Files selected for processing (79)
💤 Files with no reviewable changes (33)
🚧 Files skipped from review as they are similar to previous changes (42)
📝 WalkthroughWalkthroughThe change removes ChangesWatch removal and type stabilization
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.44.1)baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.jsast-grep timed out on this file 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 |
3bb463c to
1662436
Compare
Binary size checks passed✅ 7 passed
Generated by |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
baml_language/crates/bex_engine/src/lib.rs (1)
1479-1505: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy liftHandle
VmExecState::EarlyYieldin$init
vm.exec()can yield at GC safepoints here, but this loop treatsEarlyYieldasInitFailed. That turns a normal safepoint into an engine-construction failure; handle it the same way as the main VM loop instead of falling through to the error path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/crates/bex_engine/src/lib.rs` around lines 1479 - 1505, Update the $init execution loop around vm.exec() to handle VmExecState::EarlyYield as a normal GC safepoint, matching the behavior of the main VM loop. Resume execution by continuing the loop, and keep the existing InitFailed handling for other unexpected states.Source: Coding guidelines
baml_language/crates/bex_vm_types/src/bytecode.rs (1)
496-498: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftPreserve
OpCodediscriminants.Deleting
Watch/Unwatch/Notifyfrom the middle renumbers every later opcode.lower_to_compact()writesop as u8, andTryFrom<u8>decodes those bytes back, so existing compact bytecode will be misread as different instructions. Keep explicit values or reserved gaps unless this is an intentional format break.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/crates/bex_vm_types/src/bytecode.rs` around lines 496 - 498, Preserve the existing OpCode discriminant values when removing Watch, Unwatch, and Notify. Update the OpCode definition so later variants retain their prior numeric assignments, using explicit values or reserved gaps, and keep lower_to_compact() and TryFrom<u8> compatible with existing compact bytecode.Source: Coding guidelines
🧹 Nitpick comments (2)
baml_language/crates/baml_lsp2_actions/src/completions_tests.rs (1)
720-720: 📐 Maintainability & Code Quality | 🔵 TrivialRun
cargo test --libbefore merge.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/crates/baml_lsp2_actions/src/completions_tests.rs` at line 720, Run the library test suite with cargo test --lib and resolve any failures related to the SimulateHumanGuess(history) completion test before merging.Source: Coding guidelines
baml_language/crates/baml_compiler2_mir/src/ir.rs (1)
258-285: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valueSuppressed instead of fixed:
clippy::large_enum_variantonStatementKind.Adding
#[allow(clippy::large_enum_variant)]silences the lint rather than addressing the size skew (likely fromIntrinsic { op, args: Vec<Operand> }vs. zero-sized variants likeNop), meaning everyStatement— including trivial ones — now pays the largest variant's memory cost. Consider boxing the largest variant's payload ifStatementvolume is a hot-path memory concern.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/crates/baml_compiler2_mir/src/ir.rs` around lines 258 - 285, Remove the blanket clippy suppression on StatementKind and reduce its variant size skew by boxing the large Intrinsic payload, particularly the args collection, while preserving the existing intrinsic data and construction/access behavior throughout StatementKind consumers.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.ts`:
- Line 1295: Update the BamlTy.ty union to use the lowercase "function"
discriminant instead of "Function", matching the proto oneof and generated field
casing so ty === "function" type-checks correctly.
In `@baml_language/TEST_INSTRUCTIONS.md`:
- Around line 114-120: Update the testing guidance in TEST_INSTRUCTIONS.md to
reference the existing baml_tests crate instead of the nonexistent baml_test
name, while preserving the surrounding instructions about locating the
syntax-failing base case and adding an appropriately organized test.
---
Outside diff comments:
In `@baml_language/crates/bex_engine/src/lib.rs`:
- Around line 1479-1505: Update the $init execution loop around vm.exec() to
handle VmExecState::EarlyYield as a normal GC safepoint, matching the behavior
of the main VM loop. Resume execution by continuing the loop, and keep the
existing InitFailed handling for other unexpected states.
In `@baml_language/crates/bex_vm_types/src/bytecode.rs`:
- Around line 496-498: Preserve the existing OpCode discriminant values when
removing Watch, Unwatch, and Notify. Update the OpCode definition so later
variants retain their prior numeric assignments, using explicit values or
reserved gaps, and keep lower_to_compact() and TryFrom<u8> compatible with
existing compact bytecode.
---
Nitpick comments:
In `@baml_language/crates/baml_compiler2_mir/src/ir.rs`:
- Around line 258-285: Remove the blanket clippy suppression on StatementKind
and reduce its variant size skew by boxing the large Intrinsic payload,
particularly the args collection, while preserving the existing intrinsic data
and construction/access behavior throughout StatementKind consumers.
In `@baml_language/crates/baml_lsp2_actions/src/completions_tests.rs`:
- Line 720: Run the library test suite with cargo test --lib and resolve any
failures related to the SimulateHumanGuess(history) completion test before
merging.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6c70dccb-5600-4132-9033-9d838bfa4b55
⛔ Files ignored due to path filters (14)
baml_language/Cargo.lockis excluded by!**/*.lockbaml_language/crates/baml_tests/snapshots/baml_src/_root.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/baml_src/lambdas.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/baml_src/watch.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__01_lexer__lexical_scoping.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__02_parser__lexical_scoping.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__03_hir.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_5_mir.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_tir.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__06_codegen.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__10_formatter__lexical_scoping.snapis excluded by!**/*.snapbaml_language/sdks/go/bridge_go/cffi/proto/baml_bridge/cffi/v1/baml_type.pb.gois excluded by!**/*.pb.gobaml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.d.tsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.jsis excluded by!**/dist/**
📒 Files selected for processing (82)
baml_language/TEST_INSTRUCTIONS.mdbaml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yamlbaml_language/crates/baml_cli/src/paint.rsbaml_language/crates/baml_compiler2_ast/src/ast.rsbaml_language/crates/baml_compiler2_ast/src/disambiguate.rsbaml_language/crates/baml_compiler2_ast/src/lower_expr_body.rsbaml_language/crates/baml_compiler2_emit/src/analysis.rsbaml_language/crates/baml_compiler2_emit/src/emit.rsbaml_language/crates/baml_compiler2_emit/src/pull_semantics.rsbaml_language/crates/baml_compiler2_emit/src/stack_carry.rsbaml_language/crates/baml_compiler2_emit/src/verifier.rsbaml_language/crates/baml_compiler2_mir/src/builder.rsbaml_language/crates/baml_compiler2_mir/src/ir.rsbaml_language/crates/baml_compiler2_mir/src/lower.rsbaml_language/crates/baml_compiler2_mir/src/optimize.rsbaml_language/crates/baml_compiler2_mir/src/pretty.rsbaml_language/crates/baml_compiler2_tir/src/builder.rsbaml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rsbaml_language/crates/baml_compiler2_tir/src/exhaustiveness.rsbaml_language/crates/baml_compiler2_tir/src/interfaces/coherence.rsbaml_language/crates/baml_compiler2_tir/src/interfaces/impl_rules.rsbaml_language/crates/baml_compiler2_tir/src/normalize.rsbaml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rsbaml_language/crates/baml_compiler_diagnostics/src/diagnostic.rsbaml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rsbaml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rsbaml_language/crates/baml_compiler_lexer/src/tokens.rsbaml_language/crates/baml_compiler_parser/src/parser.rsbaml_language/crates/baml_compiler_syntax/src/ast.rsbaml_language/crates/baml_compiler_syntax/src/syntax_kind.rsbaml_language/crates/baml_exec/src/auto_cli.rsbaml_language/crates/baml_fmt/src/ast/statements.rsbaml_language/crates/baml_fmt/src/ast/tokens.rsbaml_language/crates/baml_lsp2_actions/src/completions_tests.rsbaml_language/crates/baml_lsp2_actions_tests/Cargo.tomlbaml_language/crates/baml_lsp2_actions_tests/src/lib.rsbaml_language/crates/baml_lsp2_actions_tests/src/memoization.rsbaml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.bamlbaml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.bamlbaml_language/crates/baml_project/src/client_codegen.rsbaml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.bamlbaml_language/crates/baml_tests/baml_src/ns_watch/watch.bamlbaml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.bamlbaml_language/crates/baml_tests/tests/incremental_typing_repro.rsbaml_language/crates/baml_type/src/family.rsbaml_language/crates/baml_type/src/lib.rsbaml_language/crates/baml_type/src/normalize.rsbaml_language/crates/baml_type/src/runtime_ty.rsbaml_language/crates/baml_type/src/template.rsbaml_language/crates/baml_type/tests/simplify_sap_tests.rsbaml_language/crates/baml_type_macros/src/emit.rsbaml_language/crates/baml_type_macros/src/parse.rsbaml_language/crates/bex_engine/README.mdbaml_language/crates/bex_engine/src/conversion.rsbaml_language/crates/bex_engine/src/lib.rsbaml_language/crates/bex_engine/src/trace_value_encode.rsbaml_language/crates/bex_events/src/prof/proto/bamlprof.protobaml_language/crates/bex_project/src/bex_lsp/multi_project/request.rsbaml_language/crates/bex_sap/src/sap_model/convert.rsbaml_language/crates/bex_vm/README.mdbaml_language/crates/bex_vm/src/debug.rsbaml_language/crates/bex_vm/src/lib.rsbaml_language/crates/bex_vm/src/package_baml/json.rsbaml_language/crates/bex_vm/src/package_baml/resolve.rsbaml_language/crates/bex_vm/src/type_match.rsbaml_language/crates/bex_vm/src/vm.rsbaml_language/crates/bex_vm/src/watch.rsbaml_language/crates/bex_vm/tests/call_notifications.rsbaml_language/crates/bex_vm/tests/deep_equals_bigint.rsbaml_language/crates/bex_vm/tests/watch_gc.rsbaml_language/crates/bex_vm_types/src/bytecode.rsbaml_language/crates/bex_vm_types/src/errors.rsbaml_language/crates/bridge_ctypes/src/ty_decode.rsbaml_language/crates/bridge_ctypes/src/ty_encode.rsbaml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.protobaml_language/crates/sys_llm/src/types/output_format.rsbaml_language/crates/tools_onionskin/src/compiler.rsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.jsbaml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.pybaml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.pyibaml_language/sdks/python/src/baml_bridge/proto.py
💤 Files with no reviewable changes (33)
- baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.baml
- baml_language/crates/bex_vm/tests/call_notifications.rs
- baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.baml
- baml_language/crates/bex_events/src/prof/proto/bamlprof.proto
- baml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rs
- baml_language/crates/bex_vm/tests/watch_gc.rs
- baml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.baml
- baml_language/crates/bex_vm/src/watch.rs
- baml_language/crates/baml_tests/baml_src/ns_watch/watch.baml
- baml_language/crates/sys_llm/src/types/output_format.rs
- baml_language/crates/baml_compiler2_mir/src/pretty.rs
- baml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rs
- baml_language/crates/baml_compiler2_tir/src/builder.rs
- baml_language/crates/bex_vm/src/lib.rs
- baml_language/crates/bex_vm/src/type_match.rs
- baml_language/crates/baml_compiler2_ast/src/ast.rs
- baml_language/crates/baml_cli/src/paint.rs
- baml_language/crates/baml_fmt/src/ast/tokens.rs
- baml_language/crates/tools_onionskin/src/compiler.rs
- baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yaml
- baml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rs
- baml_language/crates/baml_compiler2_emit/src/pull_semantics.rs
- baml_language/crates/baml_type/src/runtime_ty.rs
- baml_language/crates/baml_compiler_diagnostics/src/diagnostic.rs
- baml_language/crates/baml_compiler_syntax/src/syntax_kind.rs
- baml_language/crates/bridge_ctypes/src/ty_decode.rs
- baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.proto
- baml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rs
- baml_language/crates/bex_sap/src/sap_model/convert.rs
- baml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.baml
- baml_language/crates/bex_vm_types/src/errors.rs
- baml_language/crates/bex_engine/src/trace_value_encode.rs
- baml_language/crates/bex_vm/src/package_baml/json.rs
1662436 to
cfceaa5
Compare
cfceaa5 to
259a60c
Compare
259a60c to
8faf8d4
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (2)
baml_language/crates/baml_compiler2_mir/src/lower.rs (2)
3027-3033: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
restore_active_localsandrestore_locals_after_scopeare now identical.Both methods do exactly
self.locals = saved_locals;. After this PR removed the watch-stack truncation logic, there's no longer any behavioral difference between them, yetlower_catchstill callsrestore_active_locals(lines 14202, 14264) while every other site callsrestore_locals_after_scope. Worth consolidating to one method to avoid confusion about which to call.♻️ Proposed consolidation
- fn restore_locals_after_scope(&mut self, saved_locals: HashMap<Name, Local>) { - self.locals = saved_locals; - } - - fn restore_active_locals(&mut self, saved_locals: HashMap<Name, Local>) { - self.locals = saved_locals; - } + fn restore_locals_after_scope(&mut self, saved_locals: HashMap<Name, Local>) { + self.locals = saved_locals; + }And update
lower_catch's tworestore_active_locals(...)call sites torestore_locals_after_scope(...).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/crates/baml_compiler2_mir/src/lower.rs` around lines 3027 - 3033, Consolidate the identical restore helpers by removing restore_active_locals and retaining restore_locals_after_scope as the single method. Update both restore_active_locals call sites in lower_catch to invoke restore_locals_after_scope, leaving all other local restoration behavior unchanged.
2920-2935: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winConsider a regression test for the catch-binding capture fix.
Switching catch/stack-trace bindings to
DefinitionSite::CatchBinding(instead ofPatternBinding) fixes what looks like a real bug: a captured catch binding (e.g.catch (e) { ... }whereeis used inside a nested lambda) previously couldn't be found viabinding_id_for_pattern_site_name, socatch_binding_is_capturedwould always reportfalseand the binding would never get registered inbinding_locals. A small unit test exercising a captured catch binding would guard against regressions.Based on path instructions ("Prefer writing Rust unit tests over integration tests where possible" for
**/*.rs), a focused unit test in this crate would be the preferred form. Want me to draft one?🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/crates/baml_compiler2_mir/src/lower.rs` around lines 2920 - 2935, The catch-binding capture fix lacks regression coverage. Add a focused Rust unit test in the compiler crate exercising a catch binding such as `catch (e)` referenced from a nested lambda, and assert that capture detection and local registration use `DefinitionSite::CatchBinding` through `catch_binding_is_captured` and `record_catch_binding_local`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@baml_language/crates/baml_compiler2_mir/src/lower.rs`:
- Around line 3027-3033: Consolidate the identical restore helpers by removing
restore_active_locals and retaining restore_locals_after_scope as the single
method. Update both restore_active_locals call sites in lower_catch to invoke
restore_locals_after_scope, leaving all other local restoration behavior
unchanged.
- Around line 2920-2935: The catch-binding capture fix lacks regression
coverage. Add a focused Rust unit test in the compiler crate exercising a catch
binding such as `catch (e)` referenced from a nested lambda, and assert that
capture detection and local registration use `DefinitionSite::CatchBinding`
through `catch_binding_is_captured` and `record_catch_binding_local`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 63dfc673-5487-4eb9-80c8-18371d224e21
⛔ Files ignored due to path filters (13)
baml_language/crates/baml_tests/snapshots/baml_src/_root.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/baml_src/lambdas.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/baml_src/watch.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__01_lexer__lexical_scoping.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__02_parser__lexical_scoping.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__03_hir.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_5_mir.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_tir.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__06_codegen.snapis excluded by!**/*.snapbaml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__10_formatter__lexical_scoping.snapis excluded by!**/*.snapbaml_language/sdks/go/bridge_go/cffi/proto/baml_bridge/cffi/v1/baml_type.pb.gois excluded by!**/*.pb.gobaml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.d.tsis excluded by!**/dist/**baml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.jsis excluded by!**/dist/**
📒 Files selected for processing (78)
baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yamlbaml_language/crates/baml_cli/src/paint.rsbaml_language/crates/baml_compiler2_ast/src/ast.rsbaml_language/crates/baml_compiler2_ast/src/disambiguate.rsbaml_language/crates/baml_compiler2_ast/src/lower_expr_body.rsbaml_language/crates/baml_compiler2_emit/src/analysis.rsbaml_language/crates/baml_compiler2_emit/src/emit.rsbaml_language/crates/baml_compiler2_emit/src/pull_semantics.rsbaml_language/crates/baml_compiler2_emit/src/stack_carry.rsbaml_language/crates/baml_compiler2_emit/src/verifier.rsbaml_language/crates/baml_compiler2_mir/src/builder.rsbaml_language/crates/baml_compiler2_mir/src/ir.rsbaml_language/crates/baml_compiler2_mir/src/lower.rsbaml_language/crates/baml_compiler2_mir/src/optimize.rsbaml_language/crates/baml_compiler2_mir/src/pretty.rsbaml_language/crates/baml_compiler2_tir/src/builder.rsbaml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rsbaml_language/crates/baml_compiler2_tir/src/exhaustiveness.rsbaml_language/crates/baml_compiler2_tir/src/interfaces/coherence.rsbaml_language/crates/baml_compiler2_tir/src/interfaces/impl_rules.rsbaml_language/crates/baml_compiler2_tir/src/normalize.rsbaml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rsbaml_language/crates/baml_compiler_diagnostics/src/diagnostic.rsbaml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rsbaml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rsbaml_language/crates/baml_compiler_lexer/src/tokens.rsbaml_language/crates/baml_compiler_parser/src/parser.rsbaml_language/crates/baml_compiler_syntax/src/ast.rsbaml_language/crates/baml_compiler_syntax/src/syntax_kind.rsbaml_language/crates/baml_exec/src/auto_cli.rsbaml_language/crates/baml_fmt/src/ast/statements.rsbaml_language/crates/baml_fmt/src/ast/tokens.rsbaml_language/crates/baml_lsp2_actions/src/completions_tests.rsbaml_language/crates/baml_lsp2_actions_tests/test_files/semantic_tokens/const_let_else_defer.bamlbaml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.bamlbaml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.bamlbaml_language/crates/baml_project/src/client_codegen.rsbaml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.bamlbaml_language/crates/baml_tests/baml_src/ns_watch/watch.bamlbaml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.bamlbaml_language/crates/baml_tests/tests/incremental_typing_repro.rsbaml_language/crates/baml_type/src/family.rsbaml_language/crates/baml_type/src/lib.rsbaml_language/crates/baml_type/src/normalize.rsbaml_language/crates/baml_type/src/runtime_ty.rsbaml_language/crates/baml_type/src/template.rsbaml_language/crates/baml_type/tests/simplify_sap_tests.rsbaml_language/crates/baml_type_macros/src/emit.rsbaml_language/crates/baml_type_macros/src/parse.rsbaml_language/crates/bex_engine/README.mdbaml_language/crates/bex_engine/src/conversion.rsbaml_language/crates/bex_engine/src/lib.rsbaml_language/crates/bex_engine/src/trace_value_encode.rsbaml_language/crates/bex_events/src/prof/proto/bamlprof.protobaml_language/crates/bex_sap/src/sap_model/convert.rsbaml_language/crates/bex_vm/README.mdbaml_language/crates/bex_vm/src/debug.rsbaml_language/crates/bex_vm/src/lib.rsbaml_language/crates/bex_vm/src/package_baml/json.rsbaml_language/crates/bex_vm/src/package_baml/resolve.rsbaml_language/crates/bex_vm/src/type_match.rsbaml_language/crates/bex_vm/src/vm.rsbaml_language/crates/bex_vm/src/watch.rsbaml_language/crates/bex_vm/tests/call_notifications.rsbaml_language/crates/bex_vm/tests/deep_equals_bigint.rsbaml_language/crates/bex_vm/tests/watch_gc.rsbaml_language/crates/bex_vm_types/src/bytecode.rsbaml_language/crates/bex_vm_types/src/errors.rsbaml_language/crates/bridge_ctypes/src/ty_decode.rsbaml_language/crates/bridge_ctypes/src/ty_encode.rsbaml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.protobaml_language/crates/sys_llm/src/types/output_format.rsbaml_language/crates/tools_onionskin/src/compiler.rsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.jsbaml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.pybaml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.pyibaml_language/sdks/python/src/baml_bridge/proto.py
💤 Files with no reviewable changes (30)
- baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.baml
- baml_language/crates/baml_compiler2_tir/src/builder.rs
- baml_language/crates/bridge_ctypes/src/ty_decode.rs
- baml_language/crates/bex_events/src/prof/proto/bamlprof.proto
- baml_language/crates/bex_vm/tests/watch_gc.rs
- baml_language/crates/baml_compiler2_mir/src/pretty.rs
- baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.baml
- baml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.baml
- baml_language/crates/bex_vm/src/watch.rs
- baml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rs
- baml_language/crates/bex_vm_types/src/errors.rs
- baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yaml
- baml_language/crates/baml_compiler2_ast/src/ast.rs
- baml_language/crates/sys_llm/src/types/output_format.rs
- baml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rs
- baml_language/crates/baml_type/src/runtime_ty.rs
- baml_language/crates/baml_compiler_diagnostics/src/diagnostic.rs
- baml_language/crates/bex_vm/src/lib.rs
- baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.proto
- baml_language/crates/bex_vm/tests/call_notifications.rs
- baml_language/crates/baml_compiler2_emit/src/pull_semantics.rs
- baml_language/crates/baml_tests/baml_src/ns_watch/watch.baml
- baml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rs
- baml_language/crates/bex_vm/src/type_match.rs
- baml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.baml
- baml_language/crates/tools_onionskin/src/compiler.rs
- baml_language/crates/bex_engine/src/trace_value_encode.rs
- baml_language/crates/bex_sap/src/sap_model/convert.rs
- baml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rs
- baml_language/crates/bex_vm/src/package_baml/json.rs
🚧 Files skipped from review as they are similar to previous changes (43)
- baml_language/crates/baml_compiler2_ast/src/disambiguate.rs
- baml_language/sdks/python/src/baml_bridge/proto.py
- baml_language/crates/bex_vm/README.md
- baml_language/crates/baml_exec/src/auto_cli.rs
- baml_language/crates/bex_vm/tests/deep_equals_bigint.rs
- baml_language/crates/baml_fmt/src/ast/tokens.rs
- baml_language/crates/baml_lsp2_actions/src/completions_tests.rs
- baml_language/crates/bridge_ctypes/src/ty_encode.rs
- baml_language/crates/baml_type/tests/simplify_sap_tests.rs
- baml_language/crates/baml_compiler2_emit/src/verifier.rs
- baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.py
- baml_language/crates/baml_compiler2_tir/src/normalize.rs
- baml_language/crates/baml_cli/src/paint.rs
- baml_language/crates/baml_compiler2_emit/src/stack_carry.rs
- baml_language/crates/baml_project/src/client_codegen.rs
- baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.ts
- baml_language/crates/baml_compiler2_tir/src/exhaustiveness.rs
- baml_language/crates/bex_vm/src/package_baml/resolve.rs
- baml_language/crates/bex_engine/README.md
- baml_language/crates/baml_compiler_lexer/src/tokens.rs
- baml_language/crates/baml_tests/tests/incremental_typing_repro.rs
- baml_language/crates/baml_compiler_syntax/src/syntax_kind.rs
- baml_language/crates/baml_type_macros/src/emit.rs
- baml_language/crates/baml_compiler2_mir/src/ir.rs
- baml_language/crates/baml_compiler2_mir/src/builder.rs
- baml_language/crates/baml_type_macros/src/parse.rs
- baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.js
- baml_language/crates/baml_type/src/normalize.rs
- baml_language/crates/baml_compiler2_tir/src/interfaces/impl_rules.rs
- baml_language/crates/baml_compiler2_emit/src/emit.rs
- baml_language/crates/baml_type/src/template.rs
- baml_language/crates/baml_compiler2_tir/src/interfaces/coherence.rs
- baml_language/crates/bex_vm/src/debug.rs
- baml_language/crates/baml_type/src/family.rs
- baml_language/crates/baml_fmt/src/ast/statements.rs
- baml_language/crates/baml_compiler2_emit/src/analysis.rs
- baml_language/crates/bex_engine/src/conversion.rs
- baml_language/crates/baml_compiler2_ast/src/lower_expr_body.rs
- baml_language/crates/bex_engine/src/lib.rs
- baml_language/crates/baml_type/src/lib.rs
- baml_language/crates/bex_vm_types/src/bytecode.rs
- baml_language/crates/baml_compiler_parser/src/parser.rs
- baml_language/crates/bex_vm/src/vm.rs
Resolved the usual bytecode_format snapshot conflicts by regenerating with INSTA_UPDATE=always. Also removed `I::Watch(..) | I::Unwatch(..) | I::Notify(..)` from the opcode walker match arm in `bex_vm_types/src/relink.rs`: canary commit 856c713 (#4008, "chore: delete watch") deleted those `Instruction` variants, which broke the relink walker added on this branch (a semantic conflict git could not surface textually). The arms simply disappear along with the variants; no behavior change for any remaining opcode. `cargo test -p bex_vm_types` green (39 passed). Also applied clippy's `question_mark` rewrite in the new upstream `baml_lsp2_actions/src/tokens/index.rs` (match-on-parent -> `?`); semantics-preserving, keeps the nightly-clippy pre-commit hook green.
Summary by CodeRabbit
Breaking Changes
watchkeyword,watch let, and$watchruntime functionality, including watch-related diagnostics, semantic tokens, VM instructions, andwatchAccessortype support across SDK interfaces.Language
in,is, andinstanceof.catch,catch_all, andcatch_all_panicskeywords.Documentation
Bug Fixes