Closed lambdalisue closed 2 months ago
The recent changes refactor error handling within the Denops plugin, targeting Deno module cache issues. This includes a new utility function isDenoCacheIssueError
to identify such problems more reliably. Additionally, new test cases and a dummy plugin script have been introduced to validate these enhancements.
File | Change Summary |
---|---|
denops/.../service.ts |
Added isDenoCacheIssueError function and reworked error handling in the Plugin class to utilize this new function. |
denops/.../service_test.ts |
Introduced scriptInvalidConstraint2 constant and added a new test case for version detection failure scenarios. |
denops/.../testdata/dummy_invalid_constraint_plugin2.ts |
Added a new entry point function main which throws a TypeError to simulate version constraint issues. |
sequenceDiagram
participant User as User
participant Plugin as Plugin
participant Utility as Utility (isDenoCacheIssueError)
participant Deno as Deno Cache
User->>Plugin: Load Plugin
Plugin->>Deno: Fetch module
Deno-->>Plugin: Module fetch error
Plugin->>Utility: Check if error is cache issue
Utility-->>Plugin: Yes, it is
Plugin->>User: Notify error handling
Objective | Addressed | Explanation |
---|---|---|
Fix TypeError: Could not find constraint in the list of versions (#358) |
β | |
Improve error handling logic to better detect Deno cache issues (#358) | β | |
Ensure changes don't introduce side effects in existing functionalities (#358) | β |
In the land of code, where bunnies prance,
We fixed the errors with a quiet stance.
The cache it stumbled, yet now itβs clear,
Denops plugins show no fear. π
With functions new and tests so bright,
Our code now shines with all its might! π
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?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.27%. Comparing base (
2312c62
) to head (870c7f0
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
See https://github.com/vim-denops/denops.vim/issues/358#issuecomment-2185656629 for detail
Reclose #358
Summary by CodeRabbit
Bug Fixes
Tests
New Files