Skip to content

Conversation

bfredl
Copy link
Member

@bfredl bfredl commented Sep 14, 2016

As discussed in #4411.
#4568 could be used emulate the old behavior, or any client that relies on the old behavior could continue to use the deprecated functions for now; we are not in a hurry removing deprecated functions.

@ZyX-I sorry for duplicating the change in #5119 where deprectated_dispatch.lua is moved to the right location. I needed to fix the cmake rule (missing dependency) and also wanted to mention the name of the file in an error message.

/// @return The old value or nil if there was no previous value.
///
/// @warning It may return nil if there was no previous value
/// or if previous value was `v:null`.
Object nvim_buf_set_var(Buffer buffer, String name, Object value, Error *err)
Object buffer_set_var(Buffer buffer, String name, Object value, Error *err)
Copy link
Member

@justinmk justinmk Sep 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mark @deprecated ? (same for the others)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, but ain't functions with these names implicitly deprecated? When implementing the doc generation the plan is to not generate docs for these, or alternatively place them in a "deprecated" section. But anyway, it shouldn't hurt to be extra clear, so I'll add it.

@marvim marvim added the RFC label Sep 14, 2016
@bfredl bfredl force-pushed the del_var branch 2 times, most recently from f886653 to 9001d5a Compare September 14, 2016 15:31
@bfredl
Copy link
Member Author

bfredl commented Sep 14, 2016

@justinmk Thanks for the comments, updated.

@justinmk
Copy link
Member

LGTM

eq(val2, meths.del_var('lua'))
eq(NIL, request('vim_set_var', 'lua', val1))
eq(val1, request('vim_set_var', 'lua', val2))
eq(val2, request('vim_del_var', 'lua'))
end)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are tests for new functions? Also AFAIR all *_set_var and *_del_var are tested, not just vim_*.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one implementing this to start with apparently thought it was redundant, but adding for the others should be a quick matter of find and replace

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.

5 participants