-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: get baml-fmt ready for beta #1278
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 31de81f in 1 minute and 29 seconds
More details
- Looked at
603
lines of code in14
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. tools/build:169
- Draft comment:
Unresolved merge conflict markers detected. Please resolve the conflict by choosing the correct code block. - Reason this comment was not posted:
Comment looked like it was already resolved.
Workflow ID: wflow_6OQ42IE75keQk5to
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -17,7 +17,13 @@ $ pnpm add @boundaryml/baml | |||
// biome-ignore format: autogenerated code | |||
import { BamlRuntime, FunctionResult, BamlCtxManager, BamlSyncStream, Image, ClientRegistry, createBamlValidationError, BamlValidationError } from "@boundaryml/baml" | |||
import { Checked, Check } from "./types" | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved merge conflict markers detected. Please resolve the conflict by choosing the correct code block.
@@ -50,7 +50,13 @@ export default class TypeBuilder { | |||
constructor() { | |||
this.tb = new _TypeBuilder({ | |||
classes: new Set([ | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved merge conflict markers detected. Please resolve the conflict by choosing the correct code block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 74f192b in 23 seconds
More details
- Looked at
32
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. engine/cli/src/format.rs:35
- Draft comment:
Remove the commented-out line forBamlRuntime::parse_baml_src_path
if it's not needed. - Reason this comment was not posted:
Confidence changes required:50%
The commented-out line forBamlRuntime::parse_baml_src_path
should be removed if it's not needed.
Workflow ID: wflow_CkZNWWBthKsNC0V4
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on f5d40ca in 44 seconds
More details
- Looked at
71
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. engine/baml-lib/schema-ast/src/formatter/tests.rs:14
- Draft comment:
Consider reformatting theformatted
string and comparing it again to ensure idempotency of the formatter.
assert_eq!(expected.unindent().trim_end(), formatted);
let formatted = format_schema(
&formatted.unindent().trim_end(),
FormatOptions {
indent_width: 2,
fail_on_unhandled_rule: true,
},
)?;
assert_eq!(formatted.unindent().trim_end(), formatted);
- Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The PR author deliberately removed the double-formatting check from assert_format_eq(). They likely had a good reason for this, and the idempotency property is still being tested in other ways throughout the test file. The comment is essentially asking to revert a deliberate change.
Maybe the double-formatting check was important and removing it could let bugs slip through? Maybe there was a specific reason it was there in the first place?
The test file shows that idempotency is still being verified in multiple test cases by explicitly formatting the expected output again. The removal of the double-check from assert_format_eq() was likely to simplify the helper function while maintaining the same test coverage.
The comment should be deleted as it suggests reverting a deliberate change, and the property it's concerned about (formatter idempotency) is still being tested elsewhere in the file.
Workflow ID: wflow_xeo1hvtc00NbuIcE
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on bfc6041 in 15 seconds
More details
- Looked at
32
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. fern/03-reference/baml-cli/fmt.mdx:25
- Draft comment:
Add a newline at the end of the file for better compatibility with various tools and to follow best practices. - Reason this comment was not posted:
Confidence changes required:50%
The file is missing a newline at the end, which is a best practice for text files.
Workflow ID: wflow_nYTajkfaDL8VsN4p
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 703dcc1 in 25 seconds
More details
- Looked at
138
lines of code in8
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. integ-tests/typescript/baml_client/sync_client.ts:20
- Draft comment:
The importsFormatterTest0
,FormatterTest1
,FormatterTest2
, andFormatterTest3
are not used in this file. Consider removing them to clean up the code. - Reason this comment was not posted:
Confidence changes required:50%
The import statement forFormatterTest0
,FormatterTest1
,FormatterTest2
, andFormatterTest3
in the TypeScript filesync_client.ts
seems unnecessary as these classes are not used in the file. Removing unused imports can help in reducing clutter and potential confusion.
Workflow ID: wflow_RGTBc9jbYj1Aa8g1
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 179976a in 1 minute and 3 seconds
More details
- Looked at
2142
lines of code in51
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. engine/language_client_python/pyproject.toml:3
- Draft comment:
The version bump to 0.71.1 is applied across multiple files. Ensure that this version change is consistent with the intended release and that all dependencies are correctly updated. - Reason this comment was not posted:
Confidence changes required:50%
The PR description mentions that thebaml-cli fmt
is being stabilized for beta use, focusing on class formatting. However, the code changes include updates to version numbers across multiple files, which seems unrelated to the main feature described. This could indicate a version bump for a release, but it's not explicitly mentioned in the description.
2. engine/language_client_ruby/baml.gemspec:3
- Draft comment:
The version bump to 0.71.1 is applied across multiple files. Ensure that this version change is consistent with the intended release and that all dependencies are correctly updated. - Reason this comment was not posted:
Confidence changes required:50%
The PR description mentions that thebaml-cli fmt
is being stabilized for beta use, focusing on class formatting. However, the code changes include updates to version numbers across multiple files, which seems unrelated to the main feature described. This could indicate a version bump for a release, but it's not explicitly mentioned in the description.
3. engine/language_client_typescript/package.json:3
- Draft comment:
The version bump to 0.71.1 is applied across multiple files. Ensure that this version change is consistent with the intended release and that all dependencies are correctly updated. - Reason this comment was not posted:
Confidence changes required:50%
The PR description mentions that thebaml-cli fmt
is being stabilized for beta use, focusing on class formatting. However, the code changes include updates to version numbers across multiple files, which seems unrelated to the main feature described. This could indicate a version bump for a release, but it's not explicitly mentioned in the description.
4. typescript/vscode-ext/packages/package.json:5
- Draft comment:
The version bump to 0.71.1 is applied across multiple files. Ensure that this version change is consistent with the intended release and that all dependencies are correctly updated. - Reason this comment was not posted:
Confidence changes required:50%
The PR description mentions that thebaml-cli fmt
is being stabilized for beta use, focusing on class formatting. However, the code changes include updates to version numbers across multiple files, which seems unrelated to the main feature described. This could indicate a version bump for a release, but it's not explicitly mentioned in the description.
Workflow ID: wflow_cGvtzv9De9gsqsXG
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
baml-cli fmt
is now in a state where I feel reasonably comfortable advertising it for beta use.It's relatively limited in scope: I'm pretty sure
class
is the only thing it formats well;enum
andfunction
still need work.But we now have support for:
baml-format: ignore
disables the formatterImportant
Stabilizes
baml-cli fmt
for beta use, focusing on class formatting, preserving newlines and comments, and adds a directive to ignore formatting.baml-cli fmt
for beta use, focusing on formattingclass
structures.baml-format: ignore
directive to skip formatting.pretty_assertions
to1.4.1
and addsregex
inCargo.toml
.formatter/mod.rs
to handle newlines and comments better.tests.rs
for testing formatting behavior.fmt.mdx
to documentbaml-cli fmt
usage and limitations.This description was created by for 179976a. It will automatically update as commits are pushed.