Skip to content

Remove plenary.nvim from the e2e harness once neotest drops it upstream #334

Description

@rcasia

Context

Follow-up from #317 / #330.

neotest-java's own code no longer depends on plenary.nvim (archived/unmaintained) — build_tool/launcher.lua now uses vim.system and util/detect_project_type.lua reuses util/dir_scan.lua's vim.uv.fs_scandir walk. The unit/integration test harness (scripts/minimal_init.lua) also runs plenary-free.

One transitive use remains, and it is neotest's, not ours — tracked upstream in nvim-neotest/neotest#611:

  • neotest.lib.file, neotest.lib.positions, and neotest.lib.subprocess internally require plenary.path / plenary.filetype (verified against neotest @ 7bef09d1).
  • Our e2e harness builds a user-like environment by hand (nvim --headless --noplugin -u tests/testrc.vim) instead of using a plugin manager that would resolve neotest's dependencies for it.
  • Therefore Makefile (the deps/plenary.nvim target, commented as of refactor: replace plenary.nvim with native vim.system/vim.uv (#317) #330) and tests/testrc.vim still clone/append plenary.nvim. An attempt to remove it in refactor: replace plenary.nvim with native vim.system/vim.uv (#317) #330 made the e2e jobs hang at "Running tests via Neotest..." (neotest's require('plenary.path') fails, run.lua polls for results that never arrive, job dies at the 5-minute timeout) — fixed in 8bdf2ab by restoring it with explanatory comments.

Task — when (not if) neotest drops plenary

Once nvim-neotest/neotest no longer requires plenary.* internally (track: nvim-neotest/neotest — search their repo for plenary; note neotest itself may need its own de-archiving/removal PR):

  1. Remove the deps/plenary.nvim target and its install: dependency from Makefile.
  2. Remove the set runtimepath+=./deps/plenary.nvim line (and comment) from tests/testrc.vim.
  3. Remove "nvim-lua/plenary.nvim" from the two lazy.nvim install snippets in README.md (they list it under neotest's own dependencies).
  4. Re-bump the pinned deps/neotest commit in Makefile/scripts/minimal_init.lua to one at or after neotest's plenary-free commit.
  5. Verify: rm -rf deps && make install && make test-e2e passes on Ubuntu + Windows with no plenary anywhere.

Blocked on

nvim-neotest/neotest#611 — "plenary.nvim is going to be archived" (same root event as our #317: nvim-lua/plenary.nvim#677).

When that upstream issue is resolved (neotest removes its internal require("plenary.*")s), do the steps above and close this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions