vim-denops / denops.vim

🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno
https://vim-denops.github.io/denops-documentation/
MIT License
685 stars 36 forks source link

Denops v6 #302

Closed lambdalisue closed 9 months ago

lambdalisue commented 10 months ago

For Users

Changes seen by users using the Denops plugin are mostly limited to updates of supported versions, with no significant changes other than that.

Updates of Supported Versions

In Denops v6, the following versions are supported:

Name Version
Deno 1.38.5 or later
Vim 9.0.2189 or later
Neovim 0.9.4 or later

Approximately 50% Reduction in Memory Usage

The memory usage of the Denops server has been reduced by approximately half compared to v5. For more details, refer to Memory (RSS) usage difference between denops v5 and v6.

Improved Communication Speed with Vim/Neovim

Communication speed with Vim/Neovim has been enhanced, especially noticeable in Neovim, where under specific conditions, you can issue about 1.8 times more commands compared to v5. For detailed results, see Communication performance difference between denops v5 and v6.

Reduced Impact on Initialization Time Due to the Number of Plugins

The issue of increasing initialization time as the number of plugins dependent on Denops grows has been resolved. However, users who do not utilize a large number (around 100) of Denops plugins will not perceive a significant difference. For detailed results, refer to Startup performance difference between v5 and v6.

For Denops Plugin Developers

Plugins are no longer isolated by Worker threads

Until v5, each plugin was processed in a dedicated Worker thread, but from v6 onwards, processing is done in a Worker thread per Vim/Neovim instance. Be cautious if your code uses global variables, and consider using the denops.context (Record<PropertyKey, unknown>) provided for each plugin instead.

Results of console.log() always returned to Vim/Neovim

Until v5, the output location of console.log() differed between Local server and Shared server, but now it is always displayed on the Vim/Neovim side in both cases.

[!TIP] console.log() is intended for temporary use during development. If you want to display messages to users as part of the plugin's functionality, continue to use denops.cmd("echo ...") or the echo function in denops_std.

For Denops Developers

denops_core has been separated into a separate repository

The type information of Denops, which was managed in the denops/@denops directory until v5, has been separated into a separate repository called deno-denops-core. With this change, the version update policy of "no releases other than updates under the denops/@denops directory" has been abolished, and version updates will follow semantic versioning.

Lower-level test utilities included, separate from denops_test

A module named denops/@denops-private/testutil has been added to directly test the Host used in the internal implementation of Denops. As a result, the parts that were tested using denops_test have been removed, and testing is now self-contained in denops.vim.

Summary by CodeRabbit

coderabbitai[bot] commented 10 months ago

[!WARNING]

Rate Limit Exceeded

@lambdalisue has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 14 seconds before requesting another review.

How to resolve this issue? After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.
How do rate limits work? CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.
Commits Files that changed from the base of the PR and between 5a16d821639a400ae8cd7d79bbe2468962a42525 and d68e8fcade5a727e431586f53d66a2e739dba91c.

Walkthrough

The project underwent a significant update, primarily focused on improving compatibility with newer versions of Deno, Vim, and Neovim. Changes include updating version constants, refining testing workflows, and enhancing error handling. Autoload functions and internal logic were refactored for efficiency, and the plugin system was restructured to better manage communication and task execution. All updates aim to streamline the development process and ensure smoother integration with the updated software versions.

Changes

File Path Change Summary
.github/workflows/test.yml, README.md, deno.jsonc, plugin/denops.vim Updated Deno, Vim, and Neovim versions; modified test commands and coverage reporting; removed outdated versioning section.
autoload/denops.vim, autoload/health/denops.vim Replaced request function with notify; updated version constants; removed autocmd event-related functionality.
autoload/denops/_internal/... Added new logging and test functions; updated echo function behavior.
denops/@denops-private/... (various files) Refactored class structures, methods, and imports; introduced new types and tests; updated error handling; added worker-based communication logic.
denops/@denops-private/testdata/..., denops/@denops-private/testutil/... Added test data and utilities for plugin validation and testing configurations.

"In the burrow of code, we dig and we tweak, 🐇
With a hop and a jump, new versions we seek.
Through the fields of syntax, our updates now roam,
Bringing bits and bytes back to their digital home."

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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

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 .` - `Generate unit-tests for this file.` - 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 tests 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 from git and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit tests.` - `@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. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - 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/coderabbit-overrides.v2.json` ### CodeRabbit Discord Community Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.
codecov[bot] commented 10 months ago

Codecov Report

Attention: 42 lines in your changes are missing coverage. Please review.

Comparison is base (16d4bbc) 96.47% compared to head (d68e8fc) 89.66%.

Files Patch % Lines
denops/@denops-private/host/vim.ts 77.77% 12 Missing :warning:
denops/@denops-private/service.ts 88.00% 12 Missing :warning:
denops/@denops-private/testutil/conf.ts 79.41% 7 Missing :warning:
denops/@denops-private/testutil/with.ts 93.97% 5 Missing :warning:
denops/@denops-private/host/nvim.ts 95.94% 3 Missing :warning:
denops/@denops-private/version.ts 66.66% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #302 +/- ## ========================================== - Coverage 96.47% 89.66% -6.82% ========================================== Files 3 9 +6 Lines 85 648 +563 Branches 6 61 +55 ========================================== + Hits 82 581 +499 - Misses 3 67 +64 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Shougo commented 10 months ago

I have tested it in Windows environment. The initialization time is longer than previous version. It tooks time 5000ms+.

Shougo commented 9 months ago

It works for me.