Add numeric min and max builtins#3597
Conversation
Co-authored-by: Dhilan Shah <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Binary size checks passed✅ 7 passed
Generated by |
Pull Request Template
Thanks for taking the time to fill out this pull request!
Issue Reference
Please link to any related issues
Changes
Please describe the changes proposed in this pull request
baml.maxandbaml.minbuiltins for same-type numeric values (int/float).Testing
Please describe how you tested these changes
Commands run:
cargo test -p baml_builtins2_codegencargo test -p baml_tests --test numeric_min_maxcargo test --lib(reached unrelated environment linker failures: missing Node N-API symbols inbridge_nodejsand missinglibpython3.12forbridge_python)cargo test -p baml_compiler2_tir --libcargo test -p bex_vm --libcargo test -p baml_lsp2_actions --libScreenshots
If applicable, add screenshots to help explain your changes
N/A
PR Checklist
Please ensure you've completed these items
Additional Notes
Add any other context about the PR here
The stdlib currently cannot represent true overloaded function definitions with the same bytecode name, so these are exposed as generic same-type numeric builtins with compiler-side validation to provide the intended int/float overload behavior.