-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding some code that prevent asserts from parsing at all + checks no…
… long impact parsign (#1101) <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Enhance BAML's handling of assertions and checks by updating parsing logic, modifying related functions, and improving syntax highlighting. > > - **Behavior**: > - `run_user_checks()` in `coercer/mod.rs` now returns `Vec<(String, JinjaExpression, bool)>` instead of `Vec<(Constraint, bool)>`, handling only checks with labels and rejecting asserts. > - `ConstraintResults` in `deserialize_flags.rs` now stores `Vec<(String, JinjaExpression, bool)>`. > - `score.rs` no longer assigns scores to constraints in `Flag::ConstraintResults`. > - **Functions**: > - Updated `constraint_results()` in `deserialize_flags.rs` to return `Vec<(String, JinjaExpression, bool)>`. > - Updated `fmt()` for `Flag::ConstraintResults` in `deserialize_flags.rs` to display only checks. > - **Misc**: > - Minor import reordering in `coercer/mod.rs`. > - Updated tests in `test_constraints.rs` and `test_unions.rs` to reflect changes in constraint handling. > - Added `IntroToChecksDialog` component in `IntroToChecksDialog.tsx` to introduce checks to users. > - Updated `baml.tmLanguage.json` to improve syntax highlighting for checks and asserts. > > <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 3c3d210. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: Greg Hale <[email protected]>
- Loading branch information
1 parent
e665346
commit 5ec89c9
Showing
28 changed files
with
679 additions
and
152 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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.