Skip to content

doc fixes + propogate errors for baml-cli #2124

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

Merged
merged 2 commits into from
Jul 14, 2025
Merged

doc fixes + propogate errors for baml-cli #2124

merged 2 commits into from
Jul 14, 2025

Conversation

egol
Copy link
Collaborator

@egol egol commented Jul 11, 2025

Important

Enhance CLI error handling and update BAML documentation for Ruby and TypeScript with improved examples and structure.

  • CLI Error Handling:
    • Propagate errors in commands.rs for Generate, Init, Serve, Dev, Auth, Login, Deploy commands by printing error messages to stderr.
  • Protobuf Changes:
    • Update cffi.pb.go to include sizeCache and unknownFields in CFFIValueHolder, CFFIFieldTypeChecked, and CFFICollector.
    • Conditional protoimpl.UnsafeEnabled checks added for message state handling in CFFIValueChecked and CFFICollector.
  • Documentation Updates:
    • Replace <CodeBlocks> with <Tabs> in ruby.mdx and typescript.mdx for better code example organization.
    • Add streaming examples for Ruby and TypeScript in ruby.mdx and typescript.mdx.
    • Update checks-and-asserts.mdx to include detailed examples of @assert and @check usage.
    • Add examples for async and sync client usage in client.mdx.

This description was created by Ellipsis for 77c0ea1. You can customize this summary. It will automatically update as commits are pushed.

Copy link

vercel bot commented Jul 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baml ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 4:38pm

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 77c0ea1 in 3 minutes and 4 seconds. Click for details.
  • Reviewed 4861 lines of code in 11 files
  • Skipped 0 files when reviewing.
  • Skipped posting 11 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. fern/01-guide/02-languages/ruby.mdx:30
  • Draft comment:
    Stray backtick (`) detected here. It appears immediately after the code block and may be an accidental typo. Consider removing it for clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. fern/01-guide/02-languages/typescript.mdx:140
  • Draft comment:
    The Typescript guide is clear; the examples for different package managers and usage are well structured.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. fern/03-reference/baml_client/client.mdx:112
  • Draft comment:
    The BAML client reference documentation is comprehensive. The examples covering async, sync, streaming, request parsing, and stream_request patterns are clear and consistent.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. engine/language_client_codegen/src/version_check.rs:104
  • Draft comment:
    The Python update instruction includes "or uv add baml-py=={gen_version}". This phrasing is unclear and might be a typo—should it be "or use uv add ..."? Please double-check that "uv" is indeed the intended command.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
5. fern/01-guide/02-languages/python.mdx:70
  • Draft comment:
    Typographical error: "commmand" appears to have an extra 'm'. Consider changing it to "command".
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. fern/01-guide/02-languages/typescript.mdx:151
  • Draft comment:
    Typographical suggestion: "Typescript" is used in the heading on line 151, but the correct capitalization is "TypeScript".
  • Reason this comment was not posted:
    Comment was on unchanged code.
7. fern/01-guide/05-baml-advanced/dynamic-types.mdx:263
  • Draft comment:
    Typo: There is a missing space before the parenthesis in "BAML function(in this case it's User)". Consider updating it to "BAML function (in this case it's User)" for clarity.
  • Reason this comment was not posted:
    Comment was on unchanged code.
8. fern/03-reference/baml_client/client.mdx:368
  • Draft comment:
    The closing tags on lines 368 and 369 seem inconsistent. Is the opening tag <Tabs>? If so, the first closing tag should likely be </Tabs> instead of </Tab>. Please verify and fix as needed.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
9. fern/03-reference/baml_client/client.mdx:384
  • Draft comment:
    It looks like the Python code snippet is incomplete. The line from baml_client.async_client import b appears to be truncated—was the intended import missing a module or object name?
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
10. fern/03-reference/baml_client/typebuilder.mdx:330
  • Draft comment:
    There appears to be a trailing backslash at the end of line 330 (tb.User.add_property("email", tb.string()) \). If this wasn't intentional for line continuation, please remove it.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. fern/03-reference/baml_client/typebuilder.mdx:368
  • Draft comment:
    Typo: 'modyfing' should be corrected to 'modifying' in the header '## Creating/modyfing dynamic types with the add_baml method'.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_IKOqtsr4sfqywTIT

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@egol egol enabled auto-merge July 12, 2025 00:03
@egol egol disabled auto-merge July 14, 2025 16:22
@egol egol added this pull request to the merge queue Jul 14, 2025
Merged via the queue into canary with commit 083ccb7 Jul 14, 2025
19 checks passed
@egol egol deleted the egor/friday branch July 14, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant