Skip to content

Conversation

omrisarig13
Copy link

Description

The vim.validate function has been changed, keeping the old implementation available for now, but deprecated, and therefore generates warnings when running checkhealth.

Update the usage of vim.validate across the whole project, to use the new API.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Re-run checkhealth vim.deprecated after change, and ensured that vim.validate is no longer a problem.

Configuration:

  • Neovim version (nvim --version): NVIM v0.11.0, Build type: RelWithDebInfo, LuaJIT 2.1.1741730670
  • Operating system and version: TUXEDO OS 24.04 (linux 6.11.0)

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

The vim.validate function has been changed, keeping the old
implementation available for now, but deprecated, and therefore
generates warnings when running checkhealth.

Update the usage of vim.validate across the whole project, to use the
new API.
@clason
Copy link
Contributor

clason commented May 31, 2025

This won't work; you'll need to introduce a compatibility shim to support both signatures.

(Or just live with the deprecation warnings; they're not harmful to users.)

@omrisarig13
Copy link
Author

@clason Thank you for looking at my pull request.

I did not know that the plugin should support several nvim versions in the past, and assumed that the new vim.validate has been around long enough (which I can now see was wrong).

I can create a compatibility shim, but as you write, it might be better to just keep the code as it is and ignore the errors, for simplicity.

What do you think is best?

I'll be happy to update the code to also support older versions, but if that seems unnecessary to you, we might as well close this pull request.

@clason
Copy link
Contributor

clason commented Jun 1, 2025

Honestly, as this plugin is on maintenance life support currently, I'd rather wait until something breaks and then aggressively update the baseline Neovim requirement, moving to newer API and removing deprecated calls. Right now, I'd say just papering over these warnings is not worth it.

@omrisarig13
Copy link
Author

Makes perfect sense, feel free to close this merge request, or keep open for future reference.

@clason clason closed this Jun 1, 2025
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.

2 participants