cbochs / cbochs/grapple.nvim

bug: Neovim 0.12 vim.validate deprecation conflicts with 0.10 support

Open
#197 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Lua
Stars
716
Forks
33
PR merge metrics
No merged PRs in 30d

Description

### Did you check docs and existing issues?

- [x] I have read the Grapple docs
- [x] I have searched the existing issues of Grapple

### Neovim version (nvim -v)

NVIM v0.12.0

### Operating system/version

macOS Tahoe 26.4

### Describe the bug

Grapple still uses table-form `vim.validate({ ... })` in runtime code, which triggers deprecation warnings on Neovim 0.12.

The affected call sites are:
- `lua/grapple/scope_manager.lua`
- `lua/grapple/tag_container.lua`
- `lua/grapple/tag_manager.lua`

The problem is that switching those calls directly to positional `vim.validate(name, value, validator, ...)` fixes 0.12, but breaks Neovim 0.10 support.

Tested locally:
- `NVIM v0.10.4`: positional `vim.validate(...)` fails
- `NVIM v0.11.4`: works
- `NVIM v0.12.0`: works, and table-form is deprecated

So there are two valid paths:
1. Raise the minimum supported Neovim version to `0.11`
2. Add a small compatibility wrapper/version check for `vim.validate`

I have working branches for both approaches:
- Drop 0.10 support and switch directly to positional `vim.validate(...)`:
- https://github.com/maxrzaw/grapple.nvim/tree/fix/nvim-0.12-validate-deprecation
- Keep 0.10 support with a small compatibility wrapper:
- https://github.com/maxrzaw/grapple.nvim/tree/fix/nvim-validate-compat

If this sounds reasonable, I can open a PR for either approach.

### Steps To Reproduce

1. Load Grapple on Neovim `0.12.0`
2. Run `:checkhealth vim.deprecated`
3. Observe the `vim.validate({ ... })` deprecation warning

### Expected Behavior

1. Load Grapple on Neovim `0.12.0`
2. Run `:checkhealth vim.deprecated`
3. Do not observe the `vim.validate({ ... })` deprecation warning

### Repro

```Lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
require("lazy").setup({
{
"cbochs/grapple.nvim",
config = function()
require("grapple").setup()
end,
},
}, {
root = root .. "/plugins",
})
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the vim.validate call sites in lua/grapple/scope_manager.lua, lua/grapple/tag_container.lua, and lua/grapple/tag_manager.lua, along with the reported Neovim 0.10–0.12 behavior. Confirm the chosen compatibility approach and run :checkhealth vim.deprecated on Neovim 0.12, plus the supported-version checks. Done means the warning is gone without dropping or unintentionally breaking the stated support range.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.