Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

📦 Update Deno dependencies #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lambdalisue
Copy link
Owner

@lambdalisue lambdalisue commented Apr 28, 2023

The output of make update is

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/README.md

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/indexer_test.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/indexer.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/response_waiter_test.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/mod.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/example/README.md

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/example/server.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/example/client.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/response_waiter.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/deps.ts
[1/5] Looking for releases: https://deno.land/x/msgpack@v1.4/mod.ts
[1/5] Skip updating: https://deno.land/x/msgpack@v1.4/mod.ts
[2/5] Looking for releases: https://deno.land/x/std@0.184.0/async/mod.ts
[2/5] Attempting update: https://deno.land/x/std@0.184.0/async/mod.ts -> 0.217.0
[2/5] Update successful: https://deno.land/x/std@0.184.0/async/mod.ts -> 0.217.0
[3/5] Looking for releases: https://deno.land/x/std@0.184.0/streams/mod.ts
[3/5] Attempting update: https://deno.land/x/std@0.184.0/streams/mod.ts -> 0.217.0
[3/5] Update successful: https://deno.land/x/std@0.184.0/streams/mod.ts -> 0.217.0
[4/5] Looking for releases: https://deno.land/x/std@0.184.0/async/mod.ts
[4/5] Attempting update: https://deno.land/x/std@0.184.0/async/mod.ts -> 0.217.0
[4/5] Update successful: https://deno.land/x/std@0.184.0/async/mod.ts -> 0.217.0
[5/5] Looking for releases: https://deno.land/x/disposable@v1.1.0/mod.ts
[5/5] Attempting update: https://deno.land/x/disposable@v1.1.0/mod.ts -> v1.2.0
[5/5] Update successful: https://deno.land/x/disposable@v1.1.0/mod.ts -> v1.2.0

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/message_test.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/deps_test.ts
[1/3] Looking for releases: https://deno.land/std@0.184.0/testing/asserts.ts
[1/3] Attempting update: https://deno.land/std@0.184.0/testing/asserts.ts -> 0.217.0
[1/3] Update successful: https://deno.land/std@0.184.0/testing/asserts.ts -> 0.217.0
[2/3] Looking for releases: https://deno.land/std@0.184.0/async/mod.ts
[2/3] Attempting update: https://deno.land/std@0.184.0/async/mod.ts -> 0.217.0
[2/3] Update successful: https://deno.land/std@0.184.0/async/mod.ts -> 0.217.0
[3/3] Looking for releases: https://deno.land/x/disposable@v1.1.0/mod.ts
[3/3] Attempting update: https://deno.land/x/disposable@v1.1.0/mod.ts -> v1.2.0
[3/3] Update successful: https://deno.land/x/disposable@v1.1.0/mod.ts -> v1.2.0

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/session.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/message.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/session_test.ts

Already latest version:
https://deno.land/x/msgpack@v1.4/mod.ts == v1.4

Successfully updated:
https://deno.land/x/std@0.184.0/async/mod.ts 0.184.0 -> 0.217.0
https://deno.land/x/std@0.184.0/streams/mod.ts 0.184.0 -> 0.217.0
https://deno.land/x/std@0.184.0/async/mod.ts 0.184.0 -> 0.217.0
https://deno.land/x/disposable@v1.1.0/mod.ts v1.1.0 -> v1.2.0
https://deno.land/std@0.184.0/testing/asserts.ts 0.184.0 -> 0.217.0
https://deno.land/std@0.184.0/async/mod.ts 0.184.0 -> 0.217.0
https://deno.land/x/disposable@v1.1.0/mod.ts v1.1.0 -> v1.2.0
make[1]: Entering directory '/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc'
make[1]: Leaving directory '/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc'

Summary by CodeRabbit

  • Documentation
    • Updated guidance on session handling without using await for certain function calls.
  • Refactor
    • Modified session management to proceed without waiting for certain blocks to complete.
  • Chores
    • Updated dependencies to enhance functionality and improve asynchronous operations.

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 2 times, most recently from 670bbda to 15a1805 Compare May 9, 2023 00:13
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 2 times, most recently from 81871a6 to 9520176 Compare May 19, 2023 00:12
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 3 times, most recently from ffadee1 to a7e38a2 Compare May 30, 2023 00:13
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 2 times, most recently from 39b6bc9 to c4f3778 Compare June 16, 2023 00:14
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from c4f3778 to 3d25b28 Compare July 5, 2023 00:16
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 2 times, most recently from 4002575 to acc09e9 Compare July 20, 2023 00:14
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from acc09e9 to 1981ca4 Compare July 27, 2023 00:13
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 2 times, most recently from cb0de5a to 9da4132 Compare August 11, 2023 00:11
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 2 times, most recently from cbf5f8f to f6cf11f Compare August 25, 2023 00:11
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from f6cf11f to 2c4bb04 Compare September 2, 2023 00:11
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 2c4bb04 to 784427b Compare September 20, 2023 00:12
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 784427b to 2f7a837 Compare September 28, 2023 00:12
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 2 times, most recently from a08dbae to d1f5203 Compare October 13, 2023 00:12
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from d1f5203 to 005d282 Compare November 2, 2023 00:12
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 005d282 to d4a5144 Compare November 11, 2023 00:12
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from d4a5144 to 43d50ee Compare November 18, 2023 00:13
Copy link

coderabbitai bot commented Nov 18, 2023

Walkthrough

The update primarily involves removing the await keyword from using function calls across several TypeScript files, potentially altering asynchronous behavior. Additionally, there is an upgrade in dependency versions in deps.ts and deps_test.ts, reflecting enhancements and new functionalities in the updated libraries.

Changes

Files Change Summary
README.md, .../client.ts, .../server.ts, session_test.ts Removed await from using, establishSession, and try blocks, altering asynchronous control flow.
deps.ts, deps_test.ts Updated dependency versions to incorporate new features and improvements in async operations and disposable modules.

Poem

🐰✨
In the land of code, where the bits align,
A rabbit hopped through the script of time.
With a flick of its paw, the await took flight,
Dependencies grew in the moon's soft light.
Celebrate the leap, for the code does run,
Onward, upward, towards the sun! 🌞


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 96faa35 and f8eb0d7.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Additional Context Used
LanguageTool (8)
README.md (8)

Near line 1: Possible spelling mistake found.
Context: # msgpack-rpc [![deno land](http://img.shields.io/ba...


Near line 3: Possible spelling mistake found.
Context: ...deno)](https://deno.land/x/msgpack_rpc) [deno doc](...


Near line 7: Possible spelling mistake found.
Context: ...ck-rpc/actions?query=workflow%3ATest) [Deno][deno] module to support [msgpack-rpc][...


Near line 7: Unpaired symbol: ‘[’ seems to be missing
Context: ...pc/actions?query=workflow%3ATest) [Deno][deno] module to support [msgpack-rpc][m...


Near line 7: Possible spelling mistake found.
Context: ...ATest) [Deno][deno] module to support [msgpack-rpc][msgpack-rpc] by using [msgpack-deno][m...


Near line 8: Possible spelling mistake found.
Context: ...rt [msgpack-rpc][msgpack-rpc] by using [msgpack-deno][msgpack-deno]. [deno]: https://deno.l...


Near line 106: You might be missing the article “the” here.
Context: ...e); } ``` ## License The code follows MIT license written in LICENSE...


Near line 107: The preposition “to” seems more likely in this position.
Context: ...ed to agree that any modifications sent in this repository follow the license.

Additional comments not posted (2)
deps_test.ts (1)

1-3: Updated dependency versions to the latest as per the PR description.

deps.ts (1)

2-5: Updated dependency versions to the latest as per the PR description.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 3

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and 43d50ee.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Additional comments: 4
deps_test.ts (1)
  • 1-3: The updates to the dependencies in deps_test.ts reflect the changes mentioned in the pull request summary. It's important to ensure that the updated versions of these modules do not introduce breaking changes that could affect the existing codebase. It would be advisable to run the project's test suite to verify that the updates are compatible with the current code.
deps.ts (1)
  • 1-5: The updates to the import paths in deps.ts reflect the new versions of the dependencies. Ensure that the updated modules are compatible with the rest of the codebase and that any deprecated APIs have been replaced or refactored accordingly. Additionally, verify that the project's documentation, such as the README.md, has been updated to reflect these changes if necessary.
README.md (2)
  • 45-51: The removal of await before using is a significant change. The using function from the disposable package is designed to work with asynchronous operations, ensuring that resources are disposed of properly. If the using function itself returns a promise, it should be awaited to ensure that the session is properly established and managed. The author should verify that the new version of the disposable package indeed intends for using to be used without await, and that this change does not introduce any resource management issues.

  • 88-94: Similar to the previous comment, the removal of await before using could potentially lead to unmanaged resources if the using function is expected to return a promise. It is crucial to ensure that the updated disposable package's using function is intended to be used in this manner and that it does not introduce any unintended side effects in resource management.

Comment on lines 23 to 29
};

async function establishSession(conn: Deno.Conn) {
await using(new Session(conn, conn, dispatcher), async (server) => {
using(new Session(conn, conn, dispatcher), async (server) => {
console.log("Session has connected");
console.log(await server.call("helloServer", "Alice"));
console.log(await server.call("helloClient", "Alice"));
Copy link

Choose a reason for hiding this comment

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

The removal of await from the using function call is a significant change. The using function is typically used with await to ensure that the resource is disposed of properly when the promise resolves. If the using function returns a promise, not awaiting it could lead to unhandled promises and potential resource leaks if the Session object is not disposed of correctly. Verify that the using function from the disposable package has been updated in such a way that it no longer requires await and that this change is intentional and tested.

- using(new Session(conn, conn, dispatcher), async (server) => {
+ await using(new Session(conn, conn, dispatcher), async (server) => {

If the using function still returns a promise and should be awaited, the code should be corrected to include await.


Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
};
async function establishSession(conn: Deno.Conn) {
await using(new Session(conn, conn, dispatcher), async (server) => {
using(new Session(conn, conn, dispatcher), async (server) => {
console.log("Session has connected");
console.log(await server.call("helloServer", "Alice"));
console.log(await server.call("helloClient", "Alice"));
};
async function establishSession(conn: Deno.Conn) {
await using(new Session(conn, conn, dispatcher), async (server) => {
console.log("Session has connected");
console.log(await server.call("helloServer", "Alice"));
console.log(await server.call("helloClient", "Alice"));

Comment on lines 18 to 24
try {
console.log(`Connect to MessagePack-RPC server (${hostname}:${port})`);
const conn = await Deno.connect({ hostname, port });
await using(new Session(conn, conn, dispatcher), async (client) => {
using(new Session(conn, conn, dispatcher), async (client) => {
console.log(await client.call("sum", 1, 1));
console.log(await client.call("helloServer", "Bob"));
console.log(await client.call("helloClient", "Bob"));
Copy link

Choose a reason for hiding this comment

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

The removal of await before using is potentially problematic. The using function is designed to work with asynchronous resource management, ensuring that the resources are disposed of correctly once the asynchronous block is completed. By removing await, the program does not wait for the using block to complete, which can lead to resources being disposed of before the asynchronous operations within the block have finished. This can cause unexpected behavior or runtime errors.

If the using function from deps_test.ts is designed to return a promise, it should be awaited to ensure proper execution order and resource cleanup. The original code should be restored, or the using function should be modified to handle resources correctly without the need for await.

- using(new Session(conn, conn, dispatcher), async (client) => {
+ await using(new Session(conn, conn, dispatcher), async (client) => {

Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
try {
console.log(`Connect to MessagePack-RPC server (${hostname}:${port})`);
const conn = await Deno.connect({ hostname, port });
await using(new Session(conn, conn, dispatcher), async (client) => {
using(new Session(conn, conn, dispatcher), async (client) => {
console.log(await client.call("sum", 1, 1));
console.log(await client.call("helloServer", "Bob"));
console.log(await client.call("helloClient", "Bob"));
try {
console.log(`Connect to MessagePack-RPC server (${hostname}:${port})`);
const conn = await Deno.connect({ hostname, port });
await using(new Session(conn, conn, dispatcher), async (client) => {
console.log(await client.call("sum", 1, 1));
console.log(await client.call("helloServer", "Bob"));
console.log(await client.call("helloClient", "Bob"));

Comment on lines +266 to 269
using(local, async (local) => {
// Session is not closed
assertEquals(await local.call("say"), "Hello");
});
Copy link

Choose a reason for hiding this comment

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

The removal of await before using is a significant change. The using function is typically used in the context of asynchronous resource management, which ensures that the resources are disposed of correctly once the asynchronous block has completed. If the using function is designed to return a promise, it should be awaited to ensure proper execution order and resource cleanup. The change should be verified to ensure that it aligns with the updated behavior of the using function in the disposable package.

If the new version of disposable has changed the using function to be synchronous or to handle promises differently, this change might be correct. However, if the using function still returns a promise and the intention is to perform asynchronous operations within the callback, the await keyword should be retained.

Here's how the code should look if the await is still required:

- using(local, async (local) => {
+ await using(local, async (local) => {

Please verify the behavior of the using function in the updated disposable package to determine the correct usage.


Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
using(local, async (local) => {
// Session is not closed
assertEquals(await local.call("say"), "Hello");
});
await using(local, async (local) => {
// Session is not closed
assertEquals(await local.call("say"), "Hello");
});

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 43d50ee to 862d667 Compare November 25, 2023 00:12
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and 862d667.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Additional comments: 5
README.md (2)
  • 47-51:
    Verify that the using function from the disposable module no longer returns a promise or that its asynchronous operations are handled internally, to ensure that the removal of await does not introduce any control flow issues.

  • 88-94:
    As with the server example, confirm that the using function's behavior has changed in such a way that it no longer requires the await keyword, to prevent potential control flow issues.

deps.ts (1)
  • 1-5:

The updates to the dependencies and types in deps.ts are consistent with the changes described in the summary. Ensure that all dependent code has been tested with these new versions to avoid any compatibility issues.

example/client.ts (1)
  • 18-24:

The removal of await before using may lead to improper resource management if the using function is still expected to return a promise. Verify that the updated using function from deps_test.ts handles resources correctly without the need for await. If not, consider restoring the await keyword to ensure proper execution order and resource cleanup.

session_test.ts (1)
  • 266-269:

Skip generating similar comments as the past comment is still valid.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and 9277f95.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • deps_test.ts
Additional comments: 6
deps.ts (1)
  • 2-5: Ensure that the updated versions of the std and disposable modules are compatible with the rest of the codebase and that any deprecated APIs have been replaced or updated accordingly.
example/client.ts (1)
  • 21-24:
example/server.ts (1)
  • 26-29:
README.md (2)
  • 48-51: Ensure that the removal of await before the using function calls in the example code is intentional and tested, as it could affect the control flow and timing of operations within the session establishment and message passing.

  • 91-94: Ensure that the removal of await before the using function calls in the example code is intentional and tested, as it could affect the control flow and timing of operations within the session establishment and message passing.

session_test.ts (1)
  • 266-269:

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 9277f95 to 0df4e62 Compare January 5, 2024 00:13
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and 0df4e62.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • deps.ts
Additional comments: 1
deps_test.ts (1)
  • 1-3: The updates to the module versions in deps_test.ts are correct and consistent with the PR objectives.

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 0df4e62 to 73ed38e Compare January 13, 2024 00:13
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and 73ed38e.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • deps_test.ts
Additional comments: 6
deps.ts (1)
  • 2-5: The module versions for std and disposable have been updated to 0.212.0 and v1.2.0 respectively. Ensure that the rest of the codebase is compatible with these new versions and that all tests pass.
Verification successful

Given the limitations of the current environment where Deno is not available, I will proceed with a different strategy to verify the changes in the codebase.


---

The shell script results confirm that the updated versions of the `std` and `disposable` modules are referenced in `deps.ts`. Additionally, the `disposable` module at version `v1.2.0` is also referenced in `deps_test.ts`. This indicates that the updates to the module versions have been applied consistently in the codebase where expected.



</details>

<details>
<summary>Scripts Executed</summary>

The following scripts were executed for the analysis:



---

Script:
```shell
#!/bin/bash
# Verify that the updated module versions are compatible with the rest of the codebase.
rg --type ts "https://deno.land/x/std@" --files-with-matches | xargs deno test
rg --type ts "https://deno.land/x/disposable@" --files-with-matches | xargs deno test

Length of output: 242



Script:

#!/bin/bash
# Check for references to the updated modules in TypeScript files to ensure they are using the updated versions.
rg --type ts "https://deno.land/x/std@0.212.0" --files-with-matches
rg --type ts "https://deno.land/x/disposable@v1.2.0" --files-with-matches

Length of output: 170

example/client.ts (1)
  • 21-21: The removal of await before the using function call could lead to issues if the using function is expected to return a promise. Verify that this change is intentional and that the using function has been updated to handle resources correctly without the need for await.
example/server.ts (1)
  • 26-26: As with example/client.ts, the removal of await from the using function call is a significant change. Ensure that this change is intentional and that the using function has been updated accordingly. If the using function still returns a promise, the await keyword should be retained.
README.md (2)
  • 48-48: The removal of await in the documentation examples should be verified to ensure that it reflects the intended usage of the using function. If the using function's behavior has changed, the documentation should clearly explain this to avoid confusion.

  • 91-91: Similar to the server example, verify that the removal of await in the client example within the README.md is accurate and that the documentation is updated to reflect any changes in the using function's behavior.

session_test.ts (1)
  • 266-266: The removal of await before the using function call in the test case should be verified. If the using function is designed to return a promise, it should be awaited to ensure proper execution order and resource cleanup.

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 2 times, most recently from 9c9d457 to f8ef4a7 Compare February 2, 2024 00:12
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from f8ef4a7 to 3bb0cae Compare February 9, 2024 00:12
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch 2 times, most recently from 32cfbdb to eb5c86c Compare February 23, 2024 00:12
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and eb5c86c.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • deps_test.ts
Additional comments: 2
deps.ts (1)
  • 2-5: The updates to the module versions in deps.ts are correctly formatted and follow Deno's module versioning conventions. Ensure to verify if these updates introduce any breaking changes or require adjustments in the rest of the codebase that relies on these modules.
README.md (1)
  • 48-48: The removal of await before the using statement in the example code snippets should be verified for correctness. If the using function is asynchronous and expects to be awaited, the documentation should reflect the correct usage to avoid encouraging potential misuse.

Also applies to: 91-91

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from eb5c86c to db58e7d Compare March 1, 2024 00:14
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and db58e7d.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Additional comments: 12
deps_test.ts (3)
  • 1-1: The update to std@0.218.0 for testing/asserts.ts is correct and aligns with the PR's objective to update dependencies to their latest versions. Ensure that the updated version does not introduce breaking changes that affect your tests.
  • 2-2: The update to std@0.218.0 for async/mod.ts is correct. It's important to verify that the updated delay function and any other async utilities used from this module still work as expected with the new version.
  • 3-3: The update to disposable@v1.2.0 is correct. Given the changes in the PR related to the using function, ensure that v1.2.0 of disposable supports the new usage pattern without the await keyword, as seen in other files.
deps.ts (4)
  • 2-2: The update to std@0.218.0 for async/mod.ts is correct. Ensure that the deferred and delay functions are compatible with the rest of your codebase after this update.
  • 3-3: The update to std@0.218.0 for streams/mod.ts is correct. It's important to verify that the updated streams module does not introduce any breaking changes that could affect your application's functionality.
  • 4-4: The update to std@0.218.0 for the Deferred type is correct. Ensure that any usage of Deferred in your codebase is still valid with the updated version.
  • 5-5: The update to disposable@v1.2.0 for the Disposable type is correct. Given the changes in the PR related to the using function, ensure that v1.2.0 of disposable supports the new usage pattern without the await keyword, as seen in other files.
example/client.ts (1)
  • 21-21: The removal of await before the using function call is a significant change. Based on previous comments, this change could lead to unexpected behavior if the using function is designed to work asynchronously. Ensure that the using function from disposable@v1.2.0 is intended to be used without await and that this usage pattern has been thoroughly tested.
example/server.ts (1)
  • 26-26: The removal of await before the using function call mirrors the change in example/client.ts. As previously mentioned, verify that the using function from disposable@v1.2.0 is designed to be used without await and that this change has been validated through testing.
README.md (2)
  • 48-48: The documentation update in the server example to remove await before the using function call should accurately reflect the intended usage of the using function as per the updated code. Ensure that this change is consistent with the behavior of disposable@v1.2.0 and does not mislead users.
  • 91-91: Similarly, the documentation update in the client example to remove await before the using function call should be consistent with the actual behavior of the using function in disposable@v1.2.0. It's crucial that the documentation accurately guides users on the correct usage of the library.
session_test.ts (1)
  • 266-266: The removal of await before the using function call in the test case is consistent with changes in other parts of the codebase. As with previous comments, ensure that the using function from disposable@v1.2.0 is intended to be used without await and that this change does not affect the reliability of the test.

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from db58e7d to c4d6bc3 Compare March 2, 2024 00:12
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and c4d6bc3.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Files skipped from review as they are similar to previous changes (6)
  • README.md
  • deps.ts
  • deps_test.ts
  • example/client.ts
  • example/server.ts
  • session_test.ts

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from c4d6bc3 to 9ba399e Compare March 9, 2024 00:12
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and 9ba399e.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Files skipped from review as they are similar to previous changes (5)
  • deps.ts
  • deps_test.ts
  • example/client.ts
  • example/server.ts
  • session_test.ts
Additional comments: 2
README.md (2)
  • 48-48: Removing the await keyword before using calls changes the control flow, allowing the program to proceed without waiting for the using block to complete. This adjustment aligns with the PR's objective to update control flow patterns. However, it's crucial to ensure that this change does not introduce unintended side effects, such as resource leaks or unhandled promises, especially in asynchronous operations like network communication or file I/O.
  • 91-91: Similar to the server example, the removal of await before the using call in the client example modifies the control flow. This change should be carefully evaluated to ensure it does not lead to unhandled promises or resource management issues. Given the context of a client establishing a session, it's essential to confirm that sessions are correctly managed and closed even when not explicitly awaited.

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 9ba399e to 2e12a68 Compare March 15, 2024 00:13
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and 2e12a68.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Files skipped from review as they are similar to previous changes (5)
  • deps.ts
  • deps_test.ts
  • example/client.ts
  • example/server.ts
  • session_test.ts
Additional comments: 2
README.md (2)
  • 48-48: Removing the await keyword before the using function call changes the control flow, allowing the program to proceed without waiting for the using block to complete. This might be intentional to demonstrate non-blocking behavior, but it's crucial to ensure that this change aligns with the intended usage patterns of the using function and the Session object. If the using block is expected to manage resources that must be fully processed before proceeding, reintroducing await might be necessary.
  • 91-91: Similar to the server example, removing await here alters the control flow. Ensure that this change is consistent with the desired behavior of the client-side code. If the operations within the using block are critical and should be completed before moving on, consider adding await back to ensure proper resource management and operation sequencing.

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 2e12a68 to bae2c47 Compare March 16, 2024 00:12
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and bae2c47.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Files skipped from review as they are similar to previous changes (5)
  • deps.ts
  • deps_test.ts
  • example/client.ts
  • example/server.ts
  • session_test.ts
Additional comments: 3
README.md (3)
  • 48-48: Removing the await keyword before the using function call in the server example changes the control flow, potentially leading to unintended behavior. Ensure this change aligns with the updated behavior of the using function in the new version of the disposable module.
  • 91-91: Similar to the server example, removing await before the using function call in the client example alters the control flow. Verify that this modification is intentional and consistent with the expected behavior of the using function after the dependency update.
  • 45-51: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-107]

The static analysis tool flagged potential spelling mistakes for "msgpack-rpc", "deno", and "msgpack-deno". These are false positives as they are correct in the context of this project. However, it's worth noting the grammatical suggestion to replace "in" with "to" in the sentence "Contributors need to agree that any modifications sent in this repository follow the license." This change would improve the readability of the sentence.

- Contributors need to agree that any modifications sent in this repository follow the license.
+ Contributors need to agree that any modifications sent to this repository follow the license.

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from bae2c47 to 32edea8 Compare March 28, 2024 00:13
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 96faa35 and 32edea8.
Files selected for processing (6)
  • README.md (2 hunks)
  • deps.ts (1 hunks)
  • deps_test.ts (1 hunks)
  • example/client.ts (1 hunks)
  • example/server.ts (1 hunks)
  • session_test.ts (1 hunks)
Additional comments (7)
deps_test.ts (1)
  • 1-3: The updates to the versions of asserts.ts, async/mod.ts, and disposable align with the PR's objectives and follow best practices for keeping dependencies up-to-date.
deps.ts (1)
  • 2-5: The updates to the versions of dependencies and exports in deps.ts are consistent with the PR's objectives, ensuring the project uses the latest versions of these modules.
example/client.ts (1)
  • 21-21: The removal of await before using has been previously discussed, and the concerns regarding potential issues with asynchronous resource management still apply.
example/server.ts (1)
  • 26-26: The removal of await before using has been previously discussed, and the concerns regarding potential issues with asynchronous resource management still apply.
README.md (2)
  • 48-48: The removal of await before using in the README examples has been previously discussed, and the concerns regarding potential issues with asynchronous resource management still apply.
  • 91-91: The removal of await before using in the README examples has been previously discussed, and the concerns regarding potential issues with asynchronous resource management still apply.
session_test.ts (1)
  • 266-266: The removal of await before using has been previously discussed, and the concerns regarding potential issues with asynchronous resource management still apply.

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 32edea8 to 8e99ebc Compare April 12, 2024 00:13
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Actionable comments outside the diff hunks (1)
README.md (1)

Line range hint 17-17: Consider using a markdown link for the URL to improve the readability of the documentation.

- You can use `using` provided by https://deno.land/x/disposable/ to
+ You can use `using` provided by <https://deno.land/x/disposable/> to

@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from 8e99ebc to b6d0baf Compare April 16, 2024 00:13
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Update dependencies by udd:

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/README.md

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/deps.ts
[1/5] Looking for releases: https://deno.land/x/msgpack@v1.4/mod.ts
[1/5] Skip updating: https://deno.land/x/msgpack@v1.4/mod.ts
[2/5] Looking for releases: https://deno.land/x/std@0.184.0/async/mod.ts
[2/5] Attempting update: https://deno.land/x/std@0.184.0/async/mod.ts -> 0.224.0
[2/5] Update successful: https://deno.land/x/std@0.184.0/async/mod.ts -> 0.224.0
[3/5] Looking for releases: https://deno.land/x/std@0.184.0/streams/mod.ts
[3/5] Attempting update: https://deno.land/x/std@0.184.0/streams/mod.ts -> 0.224.0
[3/5] Update successful: https://deno.land/x/std@0.184.0/streams/mod.ts -> 0.224.0
[4/5] Looking for releases: https://deno.land/x/std@0.184.0/async/mod.ts
[4/5] Attempting update: https://deno.land/x/std@0.184.0/async/mod.ts -> 0.224.0
[4/5] Update successful: https://deno.land/x/std@0.184.0/async/mod.ts -> 0.224.0
[5/5] Looking for releases: https://deno.land/x/disposable@v1.1.0/mod.ts
[5/5] Attempting update: https://deno.land/x/disposable@v1.1.0/mod.ts -> v1.2.0
[5/5] Update successful: https://deno.land/x/disposable@v1.1.0/mod.ts -> v1.2.0

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/indexer.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/message.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/session_test.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/indexer_test.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/example/README.md

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/example/client.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/example/server.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/response_waiter_test.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/deps_test.ts
[1/3] Looking for releases: https://deno.land/std@0.184.0/testing/asserts.ts
[1/3] Attempting update: https://deno.land/std@0.184.0/testing/asserts.ts -> 0.224.0
[1/3] Update successful: https://deno.land/std@0.184.0/testing/asserts.ts -> 0.224.0
[2/3] Looking for releases: https://deno.land/std@0.184.0/async/mod.ts
[2/3] Attempting update: https://deno.land/std@0.184.0/async/mod.ts -> 0.224.0
[2/3] Update successful: https://deno.land/std@0.184.0/async/mod.ts -> 0.224.0
[3/3] Looking for releases: https://deno.land/x/disposable@v1.1.0/mod.ts
[3/3] Attempting update: https://deno.land/x/disposable@v1.1.0/mod.ts -> v1.2.0
[3/3] Update successful: https://deno.land/x/disposable@v1.1.0/mod.ts -> v1.2.0

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/response_waiter.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/mod.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/session.ts

/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc/message_test.ts

Already latest version:
https://deno.land/x/msgpack@v1.4/mod.ts == v1.4

Successfully updated:
https://deno.land/x/std@0.184.0/async/mod.ts 0.184.0 -> 0.224.0
https://deno.land/x/std@0.184.0/streams/mod.ts 0.184.0 -> 0.224.0
https://deno.land/x/std@0.184.0/async/mod.ts 0.184.0 -> 0.224.0
https://deno.land/x/disposable@v1.1.0/mod.ts v1.1.0 -> v1.2.0
https://deno.land/std@0.184.0/testing/asserts.ts 0.184.0 -> 0.224.0
https://deno.land/std@0.184.0/async/mod.ts 0.184.0 -> 0.224.0
https://deno.land/x/disposable@v1.1.0/mod.ts v1.1.0 -> v1.2.0
make[1]: Entering directory '/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc'
make[1]: Leaving directory '/home/runner/work/deno-msgpack-rpc/deno-msgpack-rpc'
@lambdalisue lambdalisue force-pushed the automation/update-dependencies branch from b6d0baf to f8eb0d7 Compare April 26, 2024 00:13
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

@@ -18,7 +18,7 @@ const dispatcher: Dispatcher = {
try {
console.log(`Connect to MessagePack-RPC server (${hostname}:${port})`);
const conn = await Deno.connect({ hostname, port });
await using(new Session(conn, conn, dispatcher), async (client) => {
using(new Session(conn, conn, dispatcher), async (client) => {
Copy link

Choose a reason for hiding this comment

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

The removal of await before using could lead to premature disposal of resources if using is asynchronous. This needs to be verified or reverted to ensure proper resource management.

- using(new Session(conn, conn, dispatcher), async (client) => {
+ await using(new Session(conn, conn, dispatcher), async (client) => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
using(new Session(conn, conn, dispatcher), async (client) => {
await using(new Session(conn, conn, dispatcher), async (client) => {

@@ -23,7 +23,7 @@ const dispatcher: Dispatcher = {
};

async function establishSession(conn: Deno.Conn) {
await using(new Session(conn, conn, dispatcher), async (server) => {
using(new Session(conn, conn, dispatcher), async (server) => {
Copy link

Choose a reason for hiding this comment

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

The removal of await before using could lead to premature disposal of resources if using is asynchronous. This needs to be verified or reverted to ensure proper resource management.

- using(new Session(conn, conn, dispatcher), async (server) => {
+ await using(new Session(conn, conn, dispatcher), async (server) => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
using(new Session(conn, conn, dispatcher), async (server) => {
await using(new Session(conn, conn, dispatcher), async (server) => {

@@ -45,7 +45,7 @@ const dispatcher: Dispatcher = {
};

async function establishSession(conn: Deno.Conn) {
await using(new Session(conn, conn, dispatcher), async (server) => {
using(new Session(conn, conn, dispatcher), async (server) => {
Copy link

Choose a reason for hiding this comment

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

The removal of await before using could lead to premature disposal of resources if using is asynchronous. This needs to be verified or reverted to ensure proper resource management.

- using(new Session(conn, conn, dispatcher), async (server) => {
+ await using(new Session(conn, conn, dispatcher), async (server) => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
using(new Session(conn, conn, dispatcher), async (server) => {
await using(new Session(conn, conn, dispatcher), async (server) => {

@@ -88,7 +88,7 @@
try {
console.log(`Connect to MessagePack-RPC server (${hostname}:${port})`);
const conn = await Deno.connect({ hostname, port });
await using(new Session(conn, conn, dispatcher), async (client) => {
using(new Session(conn, conn, dispatcher), async (client) => {
Copy link

Choose a reason for hiding this comment

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

The removal of await before using could lead to premature disposal of resources if using is asynchronous. This needs to be verified or reverted to ensure proper resource management.

- using(new Session(conn, conn, dispatcher), async (client) => {
+ await using(new Session(conn, conn, dispatcher), async (client) => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
using(new Session(conn, conn, dispatcher), async (client) => {
await using(new Session(conn, conn, dispatcher), async (client) => {

@@ -263,7 +263,7 @@ Deno.test({
},
});

await using(local, async (local) => {
using(local, async (local) => {
Copy link

Choose a reason for hiding this comment

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

The removal of await before using is a significant change. The using function is typically used in the context of asynchronous resource management, which ensures that the resources are disposed of correctly once the asynchronous block has completed. If the using function is designed to return a promise, it should be awaited to ensure proper execution order and resource cleanup. The change should be verified to ensure that it aligns with the updated behavior of the using function in the disposable package.

- using(local, async (local) => {
+ await using(local, async (local) => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
using(local, async (local) => {
await using(local, async (local) => {

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant