Skip to content

Conversation

ethanlijin
Copy link
Contributor

@ethanlijin ethanlijin commented Jul 30, 2025

@sxlijin


Important

Update napi crate from v2 to v3, adjusting dependencies and code to accommodate API changes.

  • Dependencies:
    • Update napi to version 3.1.3 and napi-derive to 3.1.1 in Cargo.toml.
    • Update @napi-rs/cli to 3.0.4 in package.json.
  • Code Changes:
    • Replace JsUnknown with Unknown in parse_ts_types.rs, log_collector.rs, and request.rs.
    • Update function signatures to use Function and FunctionRef for callbacks in runtime.rs and function_result_stream.rs.
    • Modify serde_value_to_js to return Unknown instead of JsUnknown in log_collector.rs.
    • Use napi_derive::module_init instead of napi::module_init in lib.rs.
  • Miscellaneous:
    • Add compat-mode feature to napi in Cargo.toml.
    • Update checksum values in Cargo.lock for updated dependencies.

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

Copy link

vercel bot commented Jul 30, 2025

@ethanlijin is attempting to deploy a commit to the Gloo Team on Vercel.

A member of the Team first needs to authorize it.

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.

Caution

Changes requested ❌

Reviewed everything up to f2bc26c in 1 minute and 41 seconds. Click for details.
  • Reviewed 894 lines of code in 10 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 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. engine/language_client_typescript/src/types/type_builder.rs:142
  • Draft comment:
    The union method locks each FieldType individually in the iteration. Consider acquiring the lock once per element (or batching the clones) to avoid repeated lock acquisitions if performance becomes a concern.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
2. engine/language_client_typescript/src/types/type_builder.rs:152
  • Draft comment:
    In the add_baml method, error mapping is done via from_anyhow_error. It would be beneficial to include additional context in the error message so that debugging failures (e.g., due to malformed BAML strings) is easier.
  • 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.
3. engine/language_client_typescript/src/types/type_builder.rs:128
  • Draft comment:
    Locking with unwrap() is used several times throughout the builder methods. Consider handling potential lock failures more gracefully (e.g., using expect with a descriptive message) to aid debugging if the lock is poisoned.
  • 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.
4. engine/language_client_typescript/src/types/type_builder.rs:185
  • Draft comment:
    Typographical issue: The block comment starting on this line is not closed. If this is intentional to comment out the code, please add a closing '*/' to properly close the comment block.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
5. engine/language_client_typescript/src/types/type_builder.rs:196
  • Draft comment:
    Typo: It appears that there's a stray block comment terminator (*/) on this line. If this is not intended to be part of a comment, please remove it to prevent confusion.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
6. engine/language_client_typescript/src/types/type_builder.rs:214
  • Draft comment:
    Typographical issue: The block comment starts with '/' on this line but does not appear to have a corresponding closing '/'. Please close the comment block or remove the opening if unintended.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
7. engine/language_client_typescript/src/types/type_builder.rs:225
  • Draft comment:
    There appears to be a stray closing block comment marker (*/) on this line. Please verify that this is intentional or remove it if it's a leftover from a previous comment block.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
8. engine/language_client_typescript/src/types/type_builder.rs:255
  • Draft comment:
    There's a stray closing comment marker (*/) on line 255 with no matching opening comment. Please remove it or fix the comment block.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
9. engine/language_client_typescript/src/types/type_builder.rs:322
  • Draft comment:
    Typographical error: The stray '*/' appears to be an unused block comment terminator. Consider removing it if it's not intended.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The comment is clearly incorrect. The '/' at line 322 is not stray - it's properly closing a block comment that starts at line 311. This is part of a pattern in the file where old implementations are commented out before being replaced with new ones. The comment is suggesting fixing something that isn't actually broken. Could there be some formatting or whitespace issue that's not visible in the plain text that's causing this to look like a stray comment to the tool? No - the code structure is very clear and consistent. The block comment is properly formatted and is part of a clear pattern used throughout the file for commenting out old implementations. The comment should be deleted as it is incorrect - there is no stray '/' and the code is properly formatted.

Workflow ID: wflow_BSP0nzSHxvU87hJ5

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

@@ -182,6 +182,7 @@ impl EnumBuilder {
self.inner.lock().unwrap().value(&name).into()
}

/*
Copy link
Contributor

Choose a reason for hiding this comment

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

The old alias implementation (using Option<&str>) is commented out and replaced with the new Option version. Consider removing these commented-out blocks to simplify maintenance and improve code clarity.

@sxlijin sxlijin self-requested a review July 30, 2025 23:51
@sxlijin
Copy link
Collaborator

sxlijin commented Jul 30, 2025

ty - we've got a big release pending so won't be able to look at this til friday

Copy link
Contributor

@antoniosarosi antoniosarosi left a comment

Choose a reason for hiding this comment

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

Nice, I think we should migrate rest of types to V3 Values Since the V2 - V3 Migration Guide specifies that some JsValues are unsafe. I'll push some changes to make this compile on canary then I'll take a look at Values.

@antoniosarosi antoniosarosi added this pull request to the merge queue Sep 5, 2025
Merged via the queue into BoundaryML:canary with commit a5294fa Sep 5, 2025
15 of 19 checks passed
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.

3 participants