<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/msgpack_rpc, branch mix_20240309</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>refactor(msgpack): allow flushing buffer while packing msgpack</title>
<updated>2024-03-07T08:39:46+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-25T14:02:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=dc37c1550bed46fffbb677d343cdc5bc94056219'/>
<id>dc37c1550bed46fffbb677d343cdc5bc94056219</id>
<content type='text'>
Before, we needed to always pack an entire msgpack_rpc Object to
a continous memory buffer before sending it out to a channel.
But this is generally wasteful. it is better to just flush
whatever is in the buffer and then continue packing to a new buffer.

This is also done for the UI event packer where there are some extra logic
to "finish" of an existing batch of nevents/ncalls. This doesn't really
stop us from flushing the buffer, just that we need to update the state
machine accordingly so the next call to prepare_call() always will
start with a new event (even though the buffer might contain overflow
data from a large event).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before, we needed to always pack an entire msgpack_rpc Object to
a continous memory buffer before sending it out to a channel.
But this is generally wasteful. it is better to just flush
whatever is in the buffer and then continue packing to a new buffer.

This is also done for the UI event packer where there are some extra logic
to "finish" of an existing batch of nevents/ncalls. This doesn't really
stop us from flushing the buffer, just that we need to update the state
machine accordingly so the next call to prepare_call() always will
start with a new event (even though the buffer might contain overflow
data from a large event).
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(msgpack): remove dead unpacker code in helpers</title>
<updated>2024-02-26T13:47:47+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-26T13:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=cdcdc10411b460b6f69aeb01bcd8bb8dcd97c5c4'/>
<id>cdcdc10411b460b6f69aeb01bcd8bb8dcd97c5c4</id>
<content type='text'>
Unpacker code now lives in unpacker.c
This was part of the old unpacker which I forgor to remove.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unpacker code now lives in unpacker.c
This was part of the old unpacker which I forgor to remove.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api): make freeing of return-value opt-in instead of opt out</title>
<updated>2024-02-21T10:58:28+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-20T12:44:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=3cc54586be7760652e8bad88cae82ce74ef9432e'/>
<id>3cc54586be7760652e8bad88cae82ce74ef9432e</id>
<content type='text'>
As only a few API functions make use of explicit freeing of the return
value, make it opt-in instead. The arena is always present under the
hood, so `Arena *arena` arg now doesn't mean anything other than getting
access to this arena. Also it is in principle possible to return an
allocated value while still using the arena as scratch space for other
stuff (unlikely, but there no reason to not allow it).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As only a few API functions make use of explicit freeing of the return
value, make it opt-in instead. The arena is always present under the
hood, so `Arena *arena` arg now doesn't mean anything other than getting
access to this arena. Also it is in principle possible to return an
allocated value while still using the arena as scratch space for other
stuff (unlikely, but there no reason to not allow it).
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api): use arena for metadata; msgpack_rpc_to_object delenda est</title>
<updated>2024-02-18T17:09:56+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-18T11:51:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=bbf6d4a4bc44c8e61f807d23cc4ff2c2683e1ef4'/>
<id>bbf6d4a4bc44c8e61f807d23cc4ff2c2683e1ef4</id>
<content type='text'>
Note: kSDItemHeader is something is _written_ by nvim in the shada file
to identify it for debugging purposes outside of nvim. But this data wasn't ever used by
neovim after reading the file back, So I removed the parsing of it for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note: kSDItemHeader is something is _written_ by nvim in the shada file
to identify it for debugging purposes outside of nvim. But this data wasn't ever used by
neovim after reading the file back, So I removed the parsing of it for now.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api): use arena for channel info and terminal info</title>
<updated>2024-02-18T09:36:07+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-17T19:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=146333ca123ab85397eb089345569cd9ed2d405a'/>
<id>146333ca123ab85397eb089345569cd9ed2d405a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(eval): use arena when converting typvals to Object</title>
<updated>2024-02-15T09:42:06+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-12T19:40:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=d60412b18e4e21f301baa2ac3f3fb7be89655e4b'/>
<id>d60412b18e4e21f301baa2ac3f3fb7be89655e4b</id>
<content type='text'>
Note: this contains two _temporary_ changes which can be reverted
once the Arena vs no-Arena distinction in API wrappers has been removed.
Both nlua_push_Object and object_to_vim_take_luaref() has been changed
to take the object argument as a pointer. This is not going to be
necessary once these are only used with arena (or not at all) allocated
Objects.

The object_to_vim() variant which leaves luaref untouched might need to
stay for a little longer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note: this contains two _temporary_ changes which can be reverted
once the Arena vs no-Arena distinction in API wrappers has been removed.
Both nlua_push_Object and object_to_vim_take_luaref() has been changed
to take the object argument as a pointer. This is not going to be
necessary once these are only used with arena (or not at all) allocated
Objects.

The object_to_vim() variant which leaves luaref untouched might need to
stay for a little longer.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lua): use Arena when converting from lua stack to API args</title>
<updated>2024-02-13T10:54:44+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-11T14:46:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=0353dd3029f9ce31c3894530385443a90f6677ee'/>
<id>0353dd3029f9ce31c3894530385443a90f6677ee</id>
<content type='text'>
and for return value of nlua_exec/nlua_call_ref, as this uses
the same family of functions.

NB: the handling of luaref:s is a bit of a mess.
add api_luarefs_free_XX functions as a stop-gap as refactoring
luarefs is a can of worms for another PR:s.

as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves
arbitrary return values.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and for return value of nlua_exec/nlua_call_ref, as this uses
the same family of functions.

NB: the handling of luaref:s is a bit of a mess.
add api_luarefs_free_XX functions as a stop-gap as refactoring
luarefs is a can of worms for another PR:s.

as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves
arbitrary return values.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api): make cstr_as_string accept "const char*"</title>
<updated>2024-02-09T14:11:21+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-09T10:42:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e0e5b7f0ba1b0440bdc2b557e2b2cfae24706cbd'/>
<id>e0e5b7f0ba1b0440bdc2b557e2b2cfae24706cbd</id>
<content type='text'>
In the context a String inside an Object/Dictionary etc is consumed,
it is considered to be read-only.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the context a String inside an Object/Dictionary etc is consumed,
it is considered to be read-only.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(rpc): assertion failure due to invalid msgpack input</title>
<updated>2024-01-21T23:42:58+00:00</updated>
<author>
<name>nwounkn</name>
<email>nwounkn@gmail.com</email>
</author>
<published>2023-08-15T23:33:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=4d4092ac9e98f04ae949c605aa6e2b55ca605a1f'/>
<id>4d4092ac9e98f04ae949c605aa6e2b55ca605a1f</id>
<content type='text'>
Problem:
  rbuffer_consumed assertion fails if Unpacker fails to parse msgpack,
  because it doesn't consume bytes on errors

Solution:
  Call rbuffer_consumed_compact only if Unpacker isn't closed
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
  rbuffer_consumed assertion fails if Unpacker fails to parse msgpack,
  because it doesn't consume bytes on errors

Solution:
  Call rbuffer_consumed_compact only if Unpacker isn't closed
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(IWYU): fix headers</title>
<updated>2024-01-11T20:37:23+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2024-01-04T14:38:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=1813661a6197c76ea6621284570aca1d56597099'/>
<id>1813661a6197c76ea6621284570aca1d56597099</id>
<content type='text'>
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
</pre>
</div>
</content>
</entry>
</feed>
