-
-
Notifications
You must be signed in to change notification settings - Fork 853
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: adapt to Nvim deprecations in 0.10 #3109
Conversation
thanks :) i am about to test these changes if they look good we can merge |
Hold on for a second; the If you can in the meantime check whether you really want to check for a list (instead of generic table or array -- which has a separate function now), that would be very helpful. |
Also, I'm not happy about having to duplicate the shims, but I wanted to avoid pulling in (heavy!) modules where they weren't before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for everything but plugin/telescope.lua
, it shouldn't make a difference to included utils. By the time these modules are included, utils would have been included.
But otherwise lgtm, thanks!
Ok, removed the duplication (except in /plugin), and fixed one more deprecation I found. @Conni2461 I think this is ready to merge. |
thanks :) i dont think we have to run with this for that long, i wanna do a 0.2 release sometime in the next 3 months (depending on how much freetime ill have) with support for 0.10 and newer. |
Yes, I think 0.10 will be a good new baseline (and waiting a bit for the inevitable 0.10.1 makes sense as well ;)) |
Do I have to do some kind of migration in my config for this? I'm getting this error in the lsp builting functions after updating:
I'm on 0.10 and it is weird that when I execute |
Are you on the Nvim 0.10 release or some old nighly? |
Having issues on nightly built_in grep_string throwing this error. E5108: Error executing lua: ...local/bin/build/nvim/share/nvim/runtime/lua/vim/iter.lua:236: flatten() requires a list-like table |
Will be fixed soon. Stick to releases, especially for the first few days/weeks after a release. |
(cherry picked from commit bbdbb75)
@clason I'm on 0.10 release
The last commits seem to have solved the issue... Not seeing it anymore. |
Fixes #3108
Note that
islist()
checks for a specific type of table: indexed by integers without holes (so{ 1 = 'a', 3 = 'b' }
is not a list); the intention is to ensure thatipairs
and#
(length) are well-defined. I did not check whether that is indeed intended in each case here; if not, consider simply replacing bytype(t) == 'table'
.On a related note, the new
flatten()
only works correctly for lists;{1,2,nil,3}
will not be flattened to{1,2,3}
. I don't know if that is an issue here, either. EDIT looks like it.EDIT2: will be fixed upstream.
(Long-term, I would recommend moving to the new
vim.iter
API that allows efficiently chaining iterators. But this is of course a major refactoring effort.)