Skip to content

Conversation

lambdalisue
Copy link
Member

@lambdalisue lambdalisue commented Jun 17, 2025

SSIA

Close #438

Summary by CodeRabbit

  • Chores
    • Updated dependencies to newer versions in several test files to ensure compatibility and stability.
    • Relaxed error message expectations in Vim host tests for improved test flexibility.
    • Modified update task to exclude specific internal modules and disable lock file usage for smoother updates.

Copy link

coderabbitai bot commented Jun 17, 2025

Walkthrough

This change updates dependency versions in several test and host files. Specifically, it upgrades the Sinon library from 18.0.0 to 21.0.0 and the messagepack-rpc package from 2.4.0 to 2.4.1. Additionally, three comment lines were added to clarify a test file's intent, and the error message expectations in some Vim host tests were relaxed. Various import sources for utility functions and stream tools were updated to newer package paths.

Changes

File(s) Change Summary
denops/@denops-private/cli_test.ts, denops/@denops-private/worker_test.ts Update Sinon library version from 18.0.0 to 21.0.0
denops/@denops-private/host/nvim.ts, denops/@denops-private/host/nvim_test.ts Update messagepack-rpc version from 2.4.0 to 2.4.1
denops/@denops-private/host/vim_test.ts Relax error message expectations in Vim host .call() and .batch() tests; update import source of unimplemented
denops/@denops-private/error.ts, denops/@denops-private/host_test.ts, denops/@denops-private/service.ts, denops/@denops-private/service_test.ts Update import source of error utility functions from @lambdalisue/errorutil to @core/errorutil
denops/@denops-private/worker.ts, tests/denops/testutil/shared_server.ts, tests/denops/testutil/with.ts Update import source of stream utility functions from @lambdalisue/streamtools to @core/streamutil
tests/denops/testdata/no_check/cli_constraint_error_on_issue_401.ts Add clarifying comments about constraint error and version
deno.jsonc Modify "update" task to add --no-lock and --ignore @std/internal flags

Assessment against linked issues

Objective Addressed Explanation
Prevent Neovim freeze when using Deno KV with denops and Deno 2.3.5+ (#438) Only dependency versions updated and test error message expectations relaxed; no direct code or logic changes addressing the freeze issue are evident.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Update Sinon library version in test files (denops/@denops-private/cli_test.ts, worker_test.ts) Sinon version updates are unrelated to the freeze issue described in #438, which concerns runtime behavior, not testing.
Add clarifying comments in test file (tests/denops/testdata/no_check/cli_constraint_error_on_issue_401.ts) Comments clarify test intent but do not address freeze or runtime issues in #438.
Relax error message expectations in Vim host tests (denops/@denops-private/host/vim_test.ts) Changes affect test assertions only and do not address runtime freeze issues in #438.
Update import sources of error utility and stream utility functions (multiple files) These import source updates do not modify runtime logic or address the freeze issue in #438.
Modify "update" task in deno.jsonc to add flags Task configuration changes do not address runtime freeze or functional issues in #438.

Possibly related PRs

  • vim-denops/denops.vim#345: Migration of import sources and package versions overlapping with this PR's dependency updates.
  • vim-denops/denops.vim#411: Updates Sinon library version in test files, related to Sinon dependency management like in this PR.

Suggested reviewers

  • Shougo
  • lambdalisue

Poem

🐇 Hopping through code with versions anew,
Sinon and messagepack-rpc too!
Tests now lighter, errors less tight,
Dependencies fresh, code feels just right.

With every update, we leap and bound,
In the garden of code, where bugs are found!
🌿✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b756da and 5b0084c.

📒 Files selected for processing (14)
  • deno.jsonc (1 hunks)
  • denops/@denops-private/cli_test.ts (1 hunks)
  • denops/@denops-private/error.ts (1 hunks)
  • denops/@denops-private/host/nvim.ts (1 hunks)
  • denops/@denops-private/host/nvim_test.ts (1 hunks)
  • denops/@denops-private/host/vim_test.ts (3 hunks)
  • denops/@denops-private/host_test.ts (1 hunks)
  • denops/@denops-private/service.ts (1 hunks)
  • denops/@denops-private/service_test.ts (1 hunks)
  • denops/@denops-private/worker.ts (1 hunks)
  • denops/@denops-private/worker_test.ts (1 hunks)
  • tests/denops/testdata/no_check/cli_constraint_error_on_issue_401.ts (1 hunks)
  • tests/denops/testutil/shared_server.ts (1 hunks)
  • tests/denops/testutil/with.ts (1 hunks)
✅ Files skipped from review due to trivial changes (5)
  • denops/@denops-private/host/nvim.ts
  • denops/@denops-private/cli_test.ts
  • tests/denops/testutil/with.ts
  • deno.jsonc
  • tests/denops/testutil/shared_server.ts
🚧 Files skipped from review as they are similar to previous changes (9)
  • denops/@denops-private/worker_test.ts
  • denops/@denops-private/host_test.ts
  • denops/@denops-private/service.ts
  • denops/@denops-private/worker.ts
  • denops/@denops-private/service_test.ts
  • denops/@denops-private/error.ts
  • denops/@denops-private/host/nvim_test.ts
  • tests/denops/testdata/no_check/cli_constraint_error_on_issue_401.ts
  • denops/@denops-private/host/vim_test.ts
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: test (macos-latest, 2.x, v9.1.0448, v0.10.0)
  • GitHub Check: test (windows-latest, 2.x, v9.1.0448, v0.10.0)
  • GitHub Check: test (ubuntu-latest, 1.x, v9.1.0448, v0.10.0)
  • GitHub Check: test (macos-latest, 1.x, v9.1.0448, v0.10.0)
  • GitHub Check: test (ubuntu-latest, 1.45.0, v9.1.0448, v0.10.0)
  • GitHub Check: test (windows-latest, 1.45.0, v9.1.0448, v0.10.0)
  • GitHub Check: test (windows-latest, 1.x, v9.1.0448, v0.10.0)
  • GitHub Check: test (ubuntu-latest, 2.x, v9.1.0448, v0.10.0)
  • GitHub Check: test (macos-latest, 1.45.0, v9.1.0448, v0.10.0)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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.

@Shougo
Copy link
Contributor

Shougo commented Jun 18, 2025

I have tested it on local.
LGTM.

@Shougo
Copy link
Contributor

Shougo commented Jun 18, 2025

Vim ... .call() ... if `fn` does not exist ... rejects with an error => ./denops/@denops-private/host/vim_test.ts:101:19
error: AssertionError: Expected error message to include "Failed to call '@@@@@' in Vim: Vim(let):E117: Unknown function: @@@@@", but got "Failed to call '@@@@@' in Vim: Vim(let):E129: Function name required\nfunction denops#api#vim#call, line 2".
    throw new AssertionError(msg);
          ^
    at assertIsError (https://jsr.io/@std/assert/1.0.13/is_error.ts:63:11)
    at assertRejects (https://jsr.io/@std/assert/1.0.13/rejects.ts:107:7)
    at eventLoopTick (ext:core/01_core.js:178:7)
    at async file:///home/shougo/work/denops.vim/denops/@denops-private/host/vim_test.ts:102:13
    at async innerWrapped (ext:cli/40_test.js:180:5)
    at async exitSanitizer (ext:cli/40_test.js:96:27)
    at async Object.outerWrapped [as fn] (ext:cli/40_test.js:123:14)
    at async TestContext.step (ext:cli/40_test.js:481:22)
    at async file:///home/shougo/work/denops.vim/denops/@denops-private/host/vim_test.ts:101:11
Vim ... .batch() ... if some function does not exist ... resolves resutls and an error => ./denops/@denops-private/host/vim_test.ts:140:19
error: AssertionError: Expected actual: "Failed to call '@@@@@' in Vim: Vim(call):E129: Function name required
function denops#api#vim#batch[3]..<lambda>2, line 1" to match: "/^Failed to call '@@@@@' in Vim: Vim\(.*\):E117: Unknown function: @@@@@/".
  throw new AssertionError(msg);
        ^
    at assertMatch (https://jsr.io/@std/assert/1.0.13/match.ts:29:9)
    at file:///home/shougo/work/denops.vim/denops/@denops-private/host/vim_test.ts:149:13
    at eventLoopTick (ext:core/01_core.js:178:7)
    at async innerWrapped (ext:cli/40_test.js:180:5)
    at async exitSanitizer (ext:cli/40_test.js:96:27)
    at async Object.outerWrapped [as fn] (ext:cli/40_test.js:123:14)
    at async TestContext.step (ext:cli/40_test.js:481:22)
    at async file:///home/shougo/work/denops.vim/denops/@denops-private/host/vim_test.ts:140:11
denops#server#start() (nvim) ... if the server is stopped with a constraint error (issue 401) ... outputs warning message => ./tests/denops/runtime/functions/server/start_test.ts:426:17
error: AssertionError: Expected actual: "[denops] Server stopped (0). Restarting..." to contain: "Execute 'call denops#cache#update(#{reload: v:true})' and restart Vim/Neovim.".
  throw new AssertionError(msg);
        ^
    at assertStringIncludes (https://jsr.io/@std/assert/1.0.13/string_includes.ts:29:9)
    at file:///home/shougo/work/denops.vim/tests/denops/runtime/functions/server/start_test.ts:428:11
    at eventLoopTick (ext:core/01_core.js:217:9)
    at async innerWrapped (ext:cli/40_test.js:180:5)
    at async exitSanitizer (ext:cli/40_test.js:96:27)
    at async Object.outerWrapped [as fn] (ext:cli/40_test.js:123:14)
    at async TestContext.step (ext:cli/40_test.js:481:22)
    at async file:///home/shougo/work/denops.vim/tests/denops/runtime/functions/server/start_test.ts:426:9
denops#server#start() (nvim) ... if the server is stopped with a constraint error (issue 401) ... does not restart the server => ./tests/denops/runtime/functions/server/start_test.ts:434:17
error: AssertionError: Expected actual: "[denops] Server stopped (0). Restarting..." to not match: "/Server stopped.*Restarting/".
  throw new AssertionError(msg);
        ^
    at assertNotMatch (https://jsr.io/@std/assert/1.0.13/not_match.ts:29:9)
    at file:///home/shougo/work/denops.vim/tests/denops/runtime/functions/server/start_test.ts:435:11
    at innerWrapped (ext:cli/40_test.js:180:11)
    at exitSanitizer (ext:cli/40_test.js:96:33)
    at Object.outerWrapped [as fn] (ext:cli/40_test.js:123:20)
    at TestContext.step (ext:cli/40_test.js:481:37)
    at file:///home/shougo/work/denops.vim/tests/denops/runtime/functions/server/start_test.ts:434:17
denops#server#start() (vim) ... if the server is stopped with a constraint error (issue 401) ... outputs warning message => ./tests/denops/runtime/functions/server/start_test.ts:426:17
error: AssertionError: Expected actual: "
[denops] Server stopped (0). Restarting..." to contain: "Execute 'call denops#cache#update(#{reload: v:true})' and restart Vim/Neovim.".
  throw new AssertionError(msg);
        ^
    at assertStringIncludes (https://jsr.io/@std/assert/1.0.13/string_includes.ts:29:9)
    at file:///home/shougo/work/denops.vim/tests/denops/runtime/functions/server/start_test.ts:428:11
    at eventLoopTick (ext:core/01_core.js:217:9)
    at async innerWrapped (ext:cli/40_test.js:180:5)
    at async exitSanitizer (ext:cli/40_test.js:96:27)
    at async Object.outerWrapped [as fn] (ext:cli/40_test.js:123:14)
    at async TestContext.step (ext:cli/40_test.js:481:22)
    at async file:///home/shougo/work/denops.vim/tests/denops/runtime/functions/server/start_test.ts:426:9
denops#server#start() (vim) ... if the server is stopped with a constraint error (issue 401) ... does not restart the server => ./tests/denops/runtime/functions/server/start_test.ts:434:17
error: AssertionError: Expected actual: "
[denops] Server stopped (0). Restarting..." to not match: "/Server stopped.*Restarting/".
  throw new AssertionError(msg);
        ^
    at assertNotMatch (https://jsr.io/@std/assert/1.0.13/not_match.ts:29:9)
    at file:///home/shougo/work/denops.vim/tests/denops/runtime/functions/server/start_test.ts:435:11
    at innerWrapped (ext:cli/40_test.js:180:11)
    at exitSanitizer (ext:cli/40_test.js:96:33)
    at Object.outerWrapped [as fn] (ext:cli/40_test.js:123:20)
    at TestContext.step (ext:cli/40_test.js:481:37)
    at file:///home/shougo/work/denops.vim/tests/denops/runtime/functions/server/start_test.ts:434:17
 FAILURES 
Vim ... .call() ... if `fn` does not exist ... rejects with an error => ./denops/@denops-private/host/vim_test.ts:101:19
Vim ... .batch() ... if some function does not exist ... resolves resutls and an error => ./denops/@denops-private/host/vim_test.ts:140:19
denops#server#start() (nvim) ... if the server is stopped with a constraint error (issue 401) ... outputs warning message => ./tests/denops/runtime/functions/server/start_test.ts:426:17
denops#server#start() (nvim) ... if the server is stopped with a constraint error (issue 401) ... does not restart the server => ./tests/denops/runtime/functions/server/start_test.ts:434:17
denops#server#start() (vim) ... if the server is stopped with a constraint error (issue 401) ... outputs warning message => ./tests/denops/runtime/functions/server/start_test.ts:426:17
denops#server#start() (vim) ... if the server is stopped with a constraint error (issue 401) ... does not restart the server => ./tests/denops/runtime/functions/server/start_test.ts:434:17

Hm... The tests are failed for me.

@Shougo
Copy link
Contributor

Shougo commented Jun 18, 2025

I have fixed some match errors.

Copy link

codecov bot commented Jun 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.59%. Comparing base (387fe57) to head (5b0084c).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #439   +/-   ##
=======================================
  Coverage   95.59%   95.59%           
=======================================
  Files          25       25           
  Lines        1430     1430           
  Branches      183      184    +1     
=======================================
  Hits         1367     1367           
  Misses         60       60           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Milly
Copy link
Contributor

Milly commented Jun 18, 2025

@lambdalisue Can I delete commit 889c632 and force push?

@lambdalisue lambdalisue merged commit 10ae0c8 into main Jun 19, 2025
23 of 24 checks passed
@lambdalisue lambdalisue deleted the update-deps branch June 19, 2025 05:59
@Milly
Copy link
Contributor

Milly commented Jun 19, 2025

Closes #437

@coderabbitai coderabbitai bot mentioned this pull request Aug 24, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Neovim Deno 2.3.5 以上で Deno KV を使っているとフリーズ
3 participants