<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/generators/gen_keysets.lua, branch userregs_2</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(api): make typed dicts appear as types in the source code</title>
<updated>2023-04-07T19:30:21+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2023-04-03T13:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=efb0896f21e03f64e3a14e7c09994e81956f47b9'/>
<id>efb0896f21e03f64e3a14e7c09994e81956f47b9</id>
<content type='text'>
problem: can we have Serde?
solution: we have Serde at home

This by itself is just a change of notation, that could be quickly
merged to avoid messy merge conflicts, but upcoming changes are planned:

- keysets no longer need to be defined in one single file. `keysets.h` is
  just the initial automatic conversion of the previous `keysets.lua`.
  keysets just used in a single api/{scope}.h can be moved to that file, later on.

- Typed dicts will have more specific types than Object. this will
  enable most of the existing manual typechecking boilerplate to be eliminated.
  We will need some annotation for missing value, i e a boolean will
  need to be represented as a TriState (none/false/true) in some cases.

- Eventually: optional parameters in form of a `Dict opts` final
  parameter will get added in some form to metadata. this will require
  a discussion/desicion about type forward compatibility.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
problem: can we have Serde?
solution: we have Serde at home

This by itself is just a change of notation, that could be quickly
merged to avoid messy merge conflicts, but upcoming changes are planned:

- keysets no longer need to be defined in one single file. `keysets.h` is
  just the initial automatic conversion of the previous `keysets.lua`.
  keysets just used in a single api/{scope}.h can be moved to that file, later on.

- Typed dicts will have more specific types than Object. this will
  enable most of the existing manual typechecking boilerplate to be eliminated.
  We will need some annotation for missing value, i e a boolean will
  need to be represented as a TriState (none/false/true) in some cases.

- Eventually: optional parameters in form of a `Dict opts` final
  parameter will get added in some form to metadata. this will require
  a discussion/desicion about type forward compatibility.
</pre>
</div>
</content>
</entry>
<entry>
<title>build: make generated source files reproducible #21586</title>
<updated>2023-01-23T09:26:46+00:00</updated>
<author>
<name>Arnout Engelen</name>
<email>arnout@engelen.eu</email>
</author>
<published>2023-01-23T09:26:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=cb757f2663e6950e655c6306d713338dfa66b18d'/>
<id>cb757f2663e6950e655c6306d713338dfa66b18d</id>
<content type='text'>
Problem:
Build is not reproducible, because generated source files (.c/.h/) are not
deterministic, mostly because Lua pairs() is unordered by design (for security).

https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671
https://www.lua.org/manual/5.1/manual.html#pdf-next
&gt; The order in which the indices are enumerated is not specified [...]
&gt;
&gt;&gt; The hardening of the VM deliberately randomizes string hashes. This in
&gt;&gt; turn randomizes the iteration order of tables with string keys.

Solution:
- Update the code generation scripts to be deterministic.
    - That is only a partial solution: the exported function
      (funcs_metadata.generated.h) and ui event
      (ui_events_metadata.generated.h) metadata have some mpack'ed
      tables, which are not serialized deterministically.
    - As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can
      inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0)
      that preserves table order.
    - Longer-term we should change the mpack'ed data structure so it no
      longer uses tables keyed by strings.

Closes #20124

Co-Authored-By: dundargoc &lt;gocdundar@gmail.com&gt;
Co-Authored-By: Arnout Engelen &lt;arnout@bzzt.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Build is not reproducible, because generated source files (.c/.h/) are not
deterministic, mostly because Lua pairs() is unordered by design (for security).

https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671
https://www.lua.org/manual/5.1/manual.html#pdf-next
&gt; The order in which the indices are enumerated is not specified [...]
&gt;
&gt;&gt; The hardening of the VM deliberately randomizes string hashes. This in
&gt;&gt; turn randomizes the iteration order of tables with string keys.

Solution:
- Update the code generation scripts to be deterministic.
    - That is only a partial solution: the exported function
      (funcs_metadata.generated.h) and ui event
      (ui_events_metadata.generated.h) metadata have some mpack'ed
      tables, which are not serialized deterministically.
    - As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can
      inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0)
      that preserves table order.
    - Longer-term we should change the mpack'ed data structure so it no
      longer uses tables keyed by strings.

Closes #20124

Co-Authored-By: dundargoc &lt;gocdundar@gmail.com&gt;
Co-Authored-By: Arnout Engelen &lt;arnout@bzzt.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api): use a keyset for highlight dicts</title>
<updated>2022-02-02T22:18:25+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-02-02T21:01:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=0bafa44f8b9c4ad2a1cf5233bc207cba522a5dfe'/>
<id>0bafa44f8b9c4ad2a1cf5233bc207cba522a5dfe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): implement nvim_{add,del}_user_command</title>
<updated>2021-12-28T21:08:44+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2021-12-22T18:40:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=eff11b3c3fcb9aa777deafb0a33b1523aa05b603'/>
<id>eff11b3c3fcb9aa777deafb0a33b1523aa05b603</id>
<content type='text'>
Add support for adding and removing custom user commands with the Nvim
API.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for adding and removing custom user commands with the Nvim
API.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api): handle option dicts properly</title>
<updated>2021-10-03T08:46:57+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2021-08-21T11:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=32565922efe0d1a6e8e4dddb23295d1a08670b54'/>
<id>32565922efe0d1a6e8e4dddb23295d1a08670b54</id>
<content type='text'>
Do not copy a lot of lua strings (dict keys) to just strequal() them
Just compare them directly to a dedicated hash function.

feat(generators): HASHY McHASHFACE
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not copy a lot of lua strings (dict keys) to just strequal() them
Just compare them directly to a dedicated hash function.

feat(generators): HASHY McHASHFACE
</pre>
</div>
</content>
</entry>
</feed>
