Make Array.slice(start) JS-compatible by defaulting end#4061
Conversation
Co-authored-by: Dhilan Shah <ATX24@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ 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 |
⏭️ 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):
|
Co-authored-by: Dhilan Shah <ATX24@users.noreply.github.com>
Binary size checks passed✅ 7 passed
Generated by |
Co-authored-by: Dhilan Shah <ATX24@users.noreply.github.com>
|
@coderabbitai review |
Co-authored-by: Dhilan Shah <ATX24@users.noreply.github.com>
…e snapshot conflicts Co-authored-by: Dhilan Shah <ATX24@users.noreply.github.com>
Co-authored-by: Dhilan Shah <ATX24@users.noreply.github.com>
Co-authored-by: Dhilan Shah <ATX24@users.noreply.github.com>
|
Deployment failed with the following error: |
|
Deployment failed with the following error: |
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
Array.slice(start)behavior while preserving existingslice(start, end)calls.Array.slice(self, start, end = self.length())and moved native execution to_slice(self, start, end).sliceto_slice.slicebehavior.baml_src/arrayscompiler2_tir::phase3a::optional_param_call_binding_diagnosticsdiagnostic_errors/optional_parameter_defaultsTesting
Please describe how you tested these changes
Commands run:
cargo test --package baml_tests --test baml_src✅cargo test --package baml_tests optional_param_call_binding_diagnostics✅cargo test --package baml_tests optional_parameter_defaults✅cargo test --libbridge_typescriptN-API linker symbols /bridge_pythonpython3.12 system lib).Screenshots
If applicable, add screenshots to help explain your changes
[Add screenshots here...]
PR Checklist
Please ensure you've completed these items
Additional Notes
Add any other context about the PR here
slice(start)and existing positionalslice(start, end)call sites.Summary by CodeRabbit
slice(start)(end defaults to the array length) to return items from the specified start through the end.