-
-
Notifications
You must be signed in to change notification settings - Fork 1
📦 Update Deno dependencies #26
base: main
Are you sure you want to change the base?
Conversation
670bbda
to
15a1805
Compare
81871a6
to
9520176
Compare
ffadee1
to
a7e38a2
Compare
39b6bc9
to
c4f3778
Compare
c4f3778
to
3d25b28
Compare
4002575
to
acc09e9
Compare
acc09e9
to
1981ca4
Compare
cb0de5a
to
9da4132
Compare
cbf5f8f
to
f6cf11f
Compare
f6cf11f
to
2c4bb04
Compare
2c4bb04
to
784427b
Compare
784427b
to
2f7a837
Compare
a08dbae
to
d1f5203
Compare
d1f5203
to
005d282
Compare
005d282
to
d4a5144
Compare
d4a5144
to
43d50ee
Compare
WalkthroughThe update primarily involves removing the Changes
Poem
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (6)
Additional Context UsedLanguageTool (8)
Additional comments not posted (2)
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
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 theREADME.md
, has been updated to reflect these changes if necessary.README.md (2)
45-51: The removal of
await
beforeusing
is a significant change. Theusing
function from thedisposable
package is designed to work with asynchronous operations, ensuring that resources are disposed of properly. If theusing
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 thedisposable
package indeed intends forusing
to be used withoutawait
, and that this change does not introduce any resource management issues.88-94: Similar to the previous comment, the removal of
await
beforeusing
could potentially lead to unmanaged resources if theusing
function is expected to return a promise. It is crucial to ensure that the updateddisposable
package'susing
function is intended to be used in this manner and that it does not introduce any unintended side effects in resource management.
}; | ||
|
||
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")); |
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.
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.
}; | |
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")); |
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")); |
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.
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.
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")); |
using(local, async (local) => { | ||
// Session is not closed | ||
assertEquals(await local.call("say"), "Hello"); | ||
}); |
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.
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.
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"); | |
}); |
43d50ee
to
862d667
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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 theusing
function from thedisposable
module no longer returns a promise or that its asynchronous operations are handled internally, to ensure that the removal ofawait
does not introduce any control flow issues.88-94:
As with the server example, confirm that theusing
function's behavior has changed in such a way that it no longer requires theawait
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
beforeusing
may lead to improper resource management if theusing
function is still expected to return a promise. Verify that the updatedusing
function fromdeps_test.ts
handles resources correctly without the need forawait
. If not, consider restoring theawait
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.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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
anddisposable
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 theusing
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 theusing
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:
9277f95
to
0df4e62
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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.
0df4e62
to
73ed38e
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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
anddisposable
have been updated to0.212.0
andv1.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-matchesLength of output: 170
example/client.ts (1)
- 21-21: The removal of
await
before theusing
function call could lead to issues if theusing
function is expected to return a promise. Verify that this change is intentional and that theusing
function has been updated to handle resources correctly without the need forawait
.example/server.ts (1)
- 26-26: As with
example/client.ts
, the removal ofawait
from theusing
function call is a significant change. Ensure that this change is intentional and that theusing
function has been updated accordingly. If theusing
function still returns a promise, theawait
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 theusing
function. If theusing
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 theREADME.md
is accurate and that the documentation is updated to reflect any changes in theusing
function's behavior.session_test.ts (1)
- 266-266: The removal of
await
before theusing
function call in the test case should be verified. If theusing
function is designed to return a promise, it should be awaited to ensure proper execution order and resource cleanup.
9c9d457
to
f8ef4a7
Compare
f8ef4a7
to
3bb0cae
Compare
32cfbdb
to
eb5c86c
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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 theusing
statement in the example code snippets should be verified for correctness. If theusing
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
eb5c86c
to
db58e7d
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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
fortesting/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
forasync/mod.ts
is correct. It's important to verify that the updateddelay
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 theusing
function, ensure thatv1.2.0
ofdisposable
supports the new usage pattern without theawait
keyword, as seen in other files.deps.ts (4)
- 2-2: The update to
std@0.218.0
forasync/mod.ts
is correct. Ensure that thedeferred
anddelay
functions are compatible with the rest of your codebase after this update.- 3-3: The update to
std@0.218.0
forstreams/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 theDeferred
type is correct. Ensure that any usage ofDeferred
in your codebase is still valid with the updated version.- 5-5: The update to
disposable@v1.2.0
for theDisposable
type is correct. Given the changes in the PR related to theusing
function, ensure thatv1.2.0
ofdisposable
supports the new usage pattern without theawait
keyword, as seen in other files.example/client.ts (1)
- 21-21: The removal of
await
before theusing
function call is a significant change. Based on previous comments, this change could lead to unexpected behavior if theusing
function is designed to work asynchronously. Ensure that theusing
function fromdisposable@v1.2.0
is intended to be used withoutawait
and that this usage pattern has been thoroughly tested.example/server.ts (1)
- 26-26: The removal of
await
before theusing
function call mirrors the change inexample/client.ts
. As previously mentioned, verify that theusing
function fromdisposable@v1.2.0
is designed to be used withoutawait
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 theusing
function call should accurately reflect the intended usage of theusing
function as per the updated code. Ensure that this change is consistent with the behavior ofdisposable@v1.2.0
and does not mislead users.- 91-91: Similarly, the documentation update in the client example to remove
await
before theusing
function call should be consistent with the actual behavior of theusing
function indisposable@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 theusing
function call in the test case is consistent with changes in other parts of the codebase. As with previous comments, ensure that theusing
function fromdisposable@v1.2.0
is intended to be used withoutawait
and that this change does not affect the reliability of the test.
db58e7d
to
c4d6bc3
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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
c4d6bc3
to
9ba399e
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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 beforeusing
calls changes the control flow, allowing the program to proceed without waiting for theusing
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 theusing
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.
9ba399e
to
2e12a68
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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 theusing
function call changes the control flow, allowing the program to proceed without waiting for theusing
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 theusing
function and theSession
object. If theusing
block is expected to manage resources that must be fully processed before proceeding, reintroducingawait
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 theusing
block are critical and should be completed before moving on, consider addingawait
back to ensure proper resource management and operation sequencing.
2e12a68
to
bae2c47
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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 theusing
function call in the server example changes the control flow, potentially leading to unintended behavior. Ensure this change aligns with the updated behavior of theusing
function in the new version of thedisposable
module.- 91-91: Similar to the server example, removing
await
before theusing
function call in the client example alters the control flow. Verify that this modification is intentional and consistent with the expected behavior of theusing
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.
bae2c47
to
32edea8
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
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
, anddisposable
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
beforeusing
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
beforeusing
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
beforeusing
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
beforeusing
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
beforeusing
has been previously discussed, and the concerns regarding potential issues with asynchronous resource management still apply.
32edea8
to
8e99ebc
Compare
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.
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
8e99ebc
to
b6d0baf
Compare
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.
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'
b6d0baf
to
f8eb0d7
Compare
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.
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) => { |
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.
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.
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) => { |
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.
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.
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) => { |
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.
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.
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) => { |
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.
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.
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) => { |
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.
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.
using(local, async (local) => { | |
await using(local, async (local) => { |
The output of
make update
isSummary by CodeRabbit
await
for certain function calls.