Old watcher binaries are left in the plugin root after an update

Open Beginner friendly
#575 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
lua
Domain
tooling

Research direction

Start in lua/codediff/core/installer/watcher.lua, around lines 70-127, at the step that moves the versioned binary into the plugin root; note what path helpers the installer already uses to locate that root. After the move, add removal of any other codediff-watcher_* files there, taking care not to delete the binary just installed. Done means bumping the watcher version twice leaves exactly one watcher binary in the plugin root — verify by running the install path in Neovim with an old binary already present.

Written by the indexing model from the issue text.

Description

The watcher installer names each binary after its version (codediff-watcher_0.23.2) and moves the new one into the plugin root without removing the one it replaces, so every watcher version bump leaves the old binary behind.

https://github.com/esmuellert/codediff.nvim/blob/09d9ebef2cc5a5c04db7a349cd6c61bdf84ecc8e/lua/codediff/core/installer/watcher.lua#L70-L127

Removing any other codediff-watcher_* after the move would fix it. Happy to send a PR if that'd help.

Dominant language
Lua
Stars
1.6k
Forks
104
Avg merge
16d 23h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from esmuellert/codediff.nvim

All issues in esmuellert/codediff.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.