Skip to content

fix(api): adapt to upstream deprecations#1440

Merged
L3MON4D3 merged 6 commits into
L3MON4D3:masterfrom
clason:fix/if_nil
May 19, 2026
Merged

fix(api): adapt to upstream deprecations#1440
L3MON4D3 merged 6 commits into
L3MON4D3:masterfrom
clason:fix/if_nil

Conversation

@clason
Copy link
Copy Markdown
Contributor

@clason clason commented May 14, 2026

  • fix(api): replace deprecated Nvim API
  • fix: add shim for deprecated vim.F.if_nil

Closes #1436

@clason clason changed the title fix(api): adapt to upstream depecrecations" fix(api): adapt to upstream deprecations May 14, 2026
@clason
Copy link
Copy Markdown
Contributor Author

clason commented May 14, 2026

@L3MON4D3 I don't understand the test failure. How old is the Nvim version you're testing here?

@e-kwsm
Copy link
Copy Markdown

e-kwsm commented May 18, 2026

How old is the Nvim version you're testing here?

seems 0.7.0 (Apr 15, 2022).

LuaSnip/Makefile

Lines 6 to 18 in a62e108

NVIM_0.7_PATH_REL=worktree_0.7
NVIM_0.9_PATH_REL=worktree_0.9
NVIM_MASTER_PATH=${NVIM_PATH}/${NVIM_MASTER_PATH_REL}
NVIM_0.7_PATH=${NVIM_PATH}/${NVIM_0.7_PATH_REL}
NVIM_0.9_PATH=${NVIM_PATH}/${NVIM_0.9_PATH_REL}
# directory as target.
${NVIM_PATH}:
# fetch current master and 0.7.0 (the minimum version we support) and 0.9.0
# (the minimum version for treesitter-postfix to work).
git clone --bare --depth 1 https://github.com/neovim/neovim ${NVIM_PATH};
git -C ${NVIM_PATH} fetch --depth 1 origin tag v0.7.0;
git -C ${NVIM_PATH} fetch --depth 1 origin tag v0.9.0;

@clason
Copy link
Copy Markdown
Contributor Author

clason commented May 18, 2026

That's way too old... It doesn't make sense to try to support anything older than 0.11, IMO.

(I would make a PR, but the whole Nix CI pipeline is too much for me.)

@L3MON4D3
Copy link
Copy Markdown
Owner

L3MON4D3 commented May 19, 2026

Hey @clason, TY for the PR :)
I think it's reasonable to drop support for older versions, especially 0.7.0 since it's... four years old 👀
0.9, luckily, still works, so I'm happy with keeping it until it becomes annoying to maintain.
I'll probably add test for 0.12 soon-ish, testing the latest stable version seems very sensible.

I've added another small fix for the vimscript eval, let me know if you have any
concerns about this PR, otherwise I'll merge this tomorrow or so :)

@clason
Copy link
Copy Markdown
Contributor Author

clason commented May 19, 2026

Thank you! That was the one thing I was not sure about, so I appreciate your fixing my (too) aggressive change!

(As a data point, I only include "stable" and "nightly" tags in CI; I try not to break the previous (stable-1) versions by intentionally dropping support, but I only guarantee coverage for those two.)

@L3MON4D3
Copy link
Copy Markdown
Owner

Thank you! That was the one thing I was not sure about, so I appreciate your fixing my (too) aggressive change!

Anytime, I'm pretty happy the tests caught it :)

(As a data point, I only include "stable" and "nightly" tags in CI; I try not to break the previous (stable-1) versions by intentionally dropping support, but I only guarantee coverage for those two.)

Ah, that's reasonable, maybe I'll do it like this on future plugins :)
IIRC there were a few times where keeping backwards compatibility so far back meant additional work.. it's just a shame it's hard to tell if anyone actually used such an old version and was (positively) affected by that, there are (usually) no issues about software working correctly :P

@L3MON4D3 L3MON4D3 merged commit ae3fce1 into L3MON4D3:master May 19, 2026
3 of 4 checks passed
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.

vim.F is deprecated in nvim 0.13 and will be removed in 0.15

3 participants