Skip to content
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

🐛 Fix denops#server#deno variable name #371

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Conversation

lambdalisue
Copy link
Member

@lambdalisue lambdalisue commented Jun 23, 2024

Close #369

Summary by CodeRabbit

  • Improvements
    • Enhanced compatibility and clarity by updating references in the Denops server processing script.
    • Added a function to define settings related to Deno for the Denops server configuration.

Copy link

coderabbitai bot commented Jun 23, 2024

Walkthrough

The primary change involves adjusting the references to global variables in the Denops server scripts to enhance clarity and compatibility. Specifically, the global variable for the Deno runtime path has been renamed from g:denops#deno to g:denops#server#deno. Additionally, a function call was added to define this new setting within the server configuration.

Changes

File Change Summary
autoload/denops/_internal/server/proc.vim Updated variable assignment for Deno runtime path.
autoload/denops/server.vim Added function call for setting g:denops#server#deno.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Vim as Vim Script
    participant DenopsServer as Denops Server
    participant Deno as Deno Runtime

    User->>Vim: Start Denops Server
    Vim->>DenopsServer: Call s:start(options)
    DenopsServer->>Vim: Update args with g:denops#server#deno
    Vim->>Deno: Run with updated args
    Deno-->>DenopsServer: Return execution result
Loading

Assessment against linked issues

Objective Addressed Explanation
Implement g:denops#server#deno variable (#369)

Poem

In the Denops land where scripts ascend,
A shift in variables, an update to commend.
From g:denops#deno to a name more clear,
g:denops#server#deno now we hold dear.
With settings refined and clarity gained,
Onward we code, our goals attained. 🐰✨


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
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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code 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 and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @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.
  • 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.

@lambdalisue lambdalisue requested a review from Milly June 23, 2024 13:37
Copy link

codecov bot commented Jun 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.23%. Comparing base (d196190) to head (2e560c2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #371   +/-   ##
=======================================
  Coverage   90.23%   90.23%           
=======================================
  Files           9        9           
  Lines         676      676           
  Branches       64       64           
=======================================
  Hits          610      610           
  Misses         66       66           

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d196190 and 2e560c2.

Files selected for processing (2)
  • autoload/denops/_internal/server/proc.vim (1 hunks)
  • autoload/denops/server.vim (1 hunks)
Additional comments not posted (2)
autoload/denops/_internal/server/proc.vim (1)

66-66: Variable name updated to match the intended configuration scope.

The update from g:denops#deno to g:denops#server#deno in the s:start function is aligned with the PR's objective to ensure the correct variable is used. This change should help in maintaining consistency and clarity in variable usage across the project.

Verification successful

Variable g:denops#server#deno is correctly initialized dynamically.

The denops#_internal#conf#define function ensures that g:denops#server#deno is initialized with a default value if it is not already set. This dynamic initialization guarantees that the variable is always defined.

  • autoload/denops/server.vim: call denops#_internal#conf#define('denops#server#deno', g:denops#deno)
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the initialization of `g:denops#server#deno`.

# Test: Search for the initialization of `g:denops#server#deno`. Expect: At least one occurrence.
rg --type vim $'let g:denops#server#deno ='

Length of output: 44



Script:

#!/bin/bash
# Description: Verify the initialization of `g:denops#server#deno` with different possible patterns.

# Test 1: Search for direct initialization.
rg --type vim $'let g:denops#server#deno'

# Test 2: Search for initialization with a different scope or within a function.
rg --type vim $'let s:denops#server#deno'
rg --type vim $'let l:denops#server#deno'
rg --type vim $'let b:denops#server#deno'

# Test 3: Search for initialization using set command.
rg --type vim $'set g:denops#server#deno'
rg --type vim $'set s:denops#server#deno'
rg --type vim $'set l:denops#server#deno'
rg --type vim $'set b:denops#server#deno'

Length of output: 343



Script:

#!/bin/bash
# Description: Verify if `g:denops#server#deno` is mentioned or set dynamically in the codebase.

# Test: Search for any mention of `denops#server#deno` in the codebase.
rg --type vim 'denops#server#deno'

Length of output: 393



Script:

#!/bin/bash
# Description: Find the implementation of the function `denops#_internal#conf#define`.

# Test: Search for the function definition of `denops#_internal#conf#define`.
rg --type vim 'function! denops#_internal#conf#define'

Length of output: 151



Script:

#!/bin/bash
# Description: Extract the implementation of the function `denops#_internal#conf#define`.

# Test: Get the implementation details of `denops#_internal#conf#define`.
rg --type vim 'function! denops#_internal#conf#define' -A 20

Length of output: 285

autoload/denops/server.vim (1)

150-150: Proper initialization of server-related settings.

The addition of denops#_internal#conf#define calls to initialize server settings such as g:denops#server#deno ensures that all configurations are properly set up. This is crucial for the correct operation of the server and helps in maintaining a consistent configuration state across the server lifecycle.

@lambdalisue lambdalisue merged commit 3864494 into main Jun 24, 2024
9 checks passed
@lambdalisue lambdalisue deleted the fix-denops-server-deno branch June 24, 2024 04:53
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.

g:denops#server#deno is not available
2 participants