Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 0.11-nightly warnings of deprecated functions #3123

Closed
wants to merge 1 commit into from

Conversation

wllfaria
Copy link

Description

on a recent PR (this one), vim.islist started to be used if version was 0.10, otherwise vim.tbl_islist would be used. This makes so 0.11 nightly builds get the deprecation warning.

Type of change

Please delete options that are not relevant.

  • Handling deprecations

  • My code follows the style guidelines of this project (stylua)

  • I have performed a self-review of my own code

@wllfaria
Copy link
Author

Personally I thought about maybe adding a function that would check against major, minor and patch versions, but I didn't really knew where I should put it, and 1.0 seems far away enough that this might be enough. I'm happy to make changes if needed.

Thank you!

@jamestrew
Copy link
Contributor

Hmm I'm on neovim 0.11 but I'm not getting any deprecation warnings related to this line of code.

:lua =vim.fn.has "nvim-0.10" returns 1 for me so it should take vim.islist over vim.tbl_islist.
I believe, by definition, has checks for whether you're at the specified version or over it.

Can you verify by trying that above command?

@wllfaria
Copy link
Author

I was checking deeper and using vim.fn.has indeed returns 1, which made things odd, I went looking and for some reason, even though Lazy said telescope was up to date, it was not, reinstalling the plugin solved. I'm sorry to waste your time. Closing this

@wllfaria wllfaria closed this May 20, 2024
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