New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add g:denops#deno_dir to set deno cache directory #295
Conversation
WalkthroughThe changes involve the introduction of a new configuration option Changes
TipsChat with CodeRabbit Bot (
|
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 (3)
- autoload/denops.vim (1 hunks)
- autoload/denops/_internal/server/proc.vim (1 hunks)
- doc/denops.txt (1 hunks)
Additional comments: 5
autoload/denops.vim (2)
22-22: The introduction of the
denops#deno_dir
configuration is consistent with the PR objectives and the summary provided. It allows users to specify a custom cache directory for Deno, which can improve startup performance for Denops plugins.19-25: The provided hunk only shows the addition of the
denops#deno_dir
configuration. The summary mentions modifications to thes:start
function and updates to the documentation, which are not present in the provided file. Ensure that these changes are also reviewed for completeness.autoload/denops/_internal/server/proc.vim (2)
71-87: The implementation of the new feature to specify a custom cache directory for Deno using the
g:denops#deno_dir
variable is correctly handled in thes:start
function. The environment variableDENO_DIR
is conditionally set based on the value ofg:denops#deno_dir
, and the custom environment is passed to thedenops#_internal#job#start
function. This change should enable the desired functionality without affecting existing behavior wheng:denops#deno_dir
is not set by the user.71-87: Please ensure that the documentation (
doc/denops.txt
) has been updated to include information about the newg:denops#deno_dir
variable and its usage. Additionally, verify that there are no other places in the code where theDENO_DIR
environment variable should be set or modified based on the new global variable.doc/denops.txt (1)
- 84-88: The documentation for
g:denops#deno_dir
is clear and correctly specifies the default value and behavior. This aligns with the PR's objective to allow users to specify a custom cache directory for Deno.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #295 +/- ##
=======================================
Coverage 92.59% 92.59%
=======================================
Files 3 3
Lines 81 81
Branches 6 6
=======================================
Hits 75 75
Misses 6 6 ☔ View full report in Codecov by Sentry. |
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.
Well, what is advantage compared to adding let $DENO_DIR = ...
on .vimrc
?
|
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.
Make sense. LGTM
In the current implementation, denops shares the deno cache directory with system.
This may lead slow startup of denops plugins when cache invalidates.
The typical invalidation occurs when the versions of deno are different among system and denops.
To improve the experience, I want to isolate deno version and cache directory for denops like below.
Summary by CodeRabbit
New Features
denops#deno_dir
to customize the Deno cache directory.Documentation
g:denops#deno_dir
variable and its usage.Bug Fixes
DENO_DIR
environment variable is set correctly based on user configuration.