Skip to content

Conversation

Shougo
Copy link
Contributor

@Shougo Shougo commented Oct 6, 2025

Summary by CodeRabbit

  • New Features

    • None
  • Performance

    • Reduced overhead in plugin script handling and cache preparation, potentially improving startup and cache update speed.
    • Avoids unnecessary data copying during script list generation.
  • Refactor

    • Simplified internal processing for plugin validation and caching to streamline execution without changing behavior.
  • Bug Fixes

    • None
  • Documentation

    • None
  • Tests

    • None
  • Chores

    • None

Copy link

coderabbitai bot commented Oct 6, 2025

Walkthrough

Refactors two Vimscript modules to replace copy(...)->map(...) patterns with mapnew(...). In autoload/denops/cache.vim and autoload/denops/plugin.vim, list-to-list transformations now use mapnew for deriving script paths, while the surrounding cache update and filtering logic remains unchanged.

Changes

Cohort / File(s) Summary
Mapnew refactor in denops autoloads
autoload/denops/cache.vim, autoload/denops/plugin.vim
Replaced copy(...)->map(...) with mapnew(...) for constructing script lists; preserved filtering and cache update logic; no public API changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hop through code with whiskers keen,
Swapping maps where copies have been.
mapnew now nibbles lists just right,
Leaner paths in moonlit byte.
Cache and scripts still hum in tune—
Carrots counted, shipped by noon. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly captures the core change of switching to mapnew without unnecessary detail, clearly reflecting the primary modification in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mapnew

📜 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 a278b83 and 87f51ea.

📒 Files selected for processing (2)
  • autoload/denops/cache.vim (1 hunks)
  • autoload/denops/plugin.vim (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: test (ubuntu-latest, 2.3.0, v9.1.1646, v0.11.3)
  • GitHub Check: test (ubuntu-latest, 2.x, v9.1.1646, v0.11.3)
  • GitHub Check: test (macos-latest, 2.3.0, v9.1.1646, v0.11.3)
  • GitHub Check: test (windows-latest, 2.3.0, v9.1.1646, v0.11.3)
  • GitHub Check: test (macos-latest, 2.x, v9.1.1646, v0.11.3)
  • GitHub Check: test (windows-latest, 2.x, v9.1.1646, v0.11.3)
🔇 Additional comments (2)
autoload/denops/plugin.vim (1)

84-85: LGTM! Cleaner method-chaining syntax.

The refactor from ->copy()->map(...) to ->mapnew(...) simplifies the code while maintaining functional equivalence. The subsequent ->filter() call continues to work correctly on the new list created by mapnew().

autoload/denops/cache.vim (1)

8-8: LGTM! Cleaner idiomatic code. mapnew() requires Vim ≥ 8.2.2235; this project enforces Vim patch-9.1.1646, so it’s supported.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

codecov bot commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.07%. Comparing base (a278b83) to head (87f51ea).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #463      +/-   ##
==========================================
+ Coverage   96.75%   97.07%   +0.32%     
==========================================
  Files          11       11              
  Lines         924      924              
  Branches      143      147       +4     
==========================================
+ Hits          894      897       +3     
+ Misses         27       24       -3     
  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.

@Shougo Shougo requested a review from lambdalisue October 6, 2025 03:51
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.

1 participant