-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement tests for dynamic types (#1343)
Docs #1307 Discussion #1310 <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Implement comprehensive testing and support for dynamic types in the BAML engine, including parsing, validation, and runtime handling. > > - **Behavior**: > - Add support for dynamic types in `to_baml_arg.rs` by checking for `dynamic_type` attribute. > - Implement `type_builder` blocks in `repr.rs` to handle dynamic type definitions within tests. > - Add validation for `type_builder` blocks in `lib.rs`. > - **Testing**: > - Add tests for dynamic types in `dynamic_types.baml`, `dynamic_types_external_cycle_errors.baml`, `dynamic_types_internal_cycle_errors.baml`, `dynamic_types_parser_errors.baml`, and `dynamic_types_validation_errors.baml`. > - Implement `run_type_builder_block_test` in `test_runtime.rs` to test dynamic type handling. > - **Parsing**: > - Update `parse_type_expression_block.rs` and `parse_value_expression_block.rs` to handle `dynamic` and `type_builder` blocks. > - Add `parse_type_builder_block.rs` for parsing `type_builder` blocks. > - **Runtime**: > - Extend `RuntimeContextManager` and `RuntimeContext` to support dynamic type overrides. > - Implement `get_test_type_builder` in `runtime_interface.rs` to retrieve type builders for tests. > - **WASM**: > - Update `runtime_wasm/mod.rs` to handle dynamic types in WASM environment. > - **Syntax Highlighting**: > - Update `codemirror-lang-baml` and `vscode-ext` to support `type_builder` and `dynamic` syntax highlighting. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup> for 483363d. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
- Loading branch information
1 parent
026bc21
commit 7f852d0
Showing
41 changed files
with
1,700 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,9 @@ RUN curl https://mise.run | sh \ | |
# Install Rust | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
|
||
# Install WASM tools | ||
RUN cargo install [email protected] wasm-pack | ||
|
||
# Install Infisical | ||
RUN curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | sudo -E bash \ | ||
&& sudo apt update && sudo apt install -y infisical |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.