<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/scripts/genvimvim.lua, branch usermarks</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<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='http://git.josher.dev/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>vim-patch:8c1b8cb2e0b5 (#18966)</title>
<updated>2022-06-15T07:20:32+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2022-06-15T07:20:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=504d7decbdef55d58e62217a0a54cbee2a0944cc'/>
<id>504d7decbdef55d58e62217a0a54cbee2a0944cc</id>
<content type='text'>
Update runtime files
https://github.com/vim/vim/commit/8c1b8cb2e0b52d0853f85c2096a2f22dbc57a788</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update runtime files
https://github.com/vim/vim/commit/8c1b8cb2e0b52d0853f85c2096a2f22dbc57a788</pre>
</div>
</content>
</entry>
<entry>
<title>fix(runtime/genvimvim): omit s[ubstitute] from vimCommand #18480</title>
<updated>2022-05-12T00:08:25+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2022-05-12T00:08:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=c24b442e310f06c3ad9d4763b09bc9cb7dbaca62'/>
<id>c24b442e310f06c3ad9d4763b09bc9cb7dbaca62</id>
<content type='text'>
It's special cased by the vimSubst syntax group, and isn't present in Vim's
vimCommand group.

For example, this fixes `call s:Foo()` highlighting `:` as Error in Nvim, as the
`s` is parsed as vimCommand rather than as vimUserFunc since
`contains=vimCommand` was added to vimUserFunc (and vimFunc) in a rt update.

Interestingly, `g:`, `l:`, etc. have the same issues due to :global, :list, etc.
Vim also has that problem, so it should ideally be fixed upstream.

We could also omit g[lobal] from vimCommand and rely on vimGlobal instead, but
it doesn't work in some cases, like when there's a `:` before the command. Also,
Vim matches only `g` in vimCommand for some reason, which doesn't produce any
highlight for `:global/foo/bar` (with Nvim you at least get some highlights on
the `global` bit despite the leading `:`).

Also, remove special handling of :py3 in syntax/vim.vim, as the generator seems
to have no problems finding it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's special cased by the vimSubst syntax group, and isn't present in Vim's
vimCommand group.

For example, this fixes `call s:Foo()` highlighting `:` as Error in Nvim, as the
`s` is parsed as vimCommand rather than as vimUserFunc since
`contains=vimCommand` was added to vimUserFunc (and vimFunc) in a rt update.

Interestingly, `g:`, `l:`, etc. have the same issues due to :global, :list, etc.
Vim also has that problem, so it should ideally be fixed upstream.

We could also omit g[lobal] from vimCommand and rely on vimGlobal instead, but
it doesn't work in some cases, like when there's a `:` before the command. Also,
Vim matches only `g` in vimCommand for some reason, which doesn't produce any
highlight for `:global/foo/bar` (with Nvim you at least get some highlights on
the `global` bit despite the leading `:`).

Also, remove special handling of :py3 in syntax/vim.vim, as the generator seems
to have no problems finding it.</pre>
</div>
</content>
</entry>
<entry>
<title>build(lint): check scripts/*.lua</title>
<updated>2021-09-19T23:36:08+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2021-09-19T23:35:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=736299bf22c47f120d0790f2390511f3302f74a3'/>
<id>736299bf22c47f120d0790f2390511f3302f74a3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Open funcs_data.mpack in binary mode. (#14944)</title>
<updated>2021-06-30T22:17:48+00:00</updated>
<author>
<name>Daniel Steinberg</name>
<email>dstein64@users.noreply.github.com</email>
</author>
<published>2021-06-30T22:17:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=fe10a4e5550d63390d8ff4bc8b91ccb00e9da00f'/>
<id>fe10a4e5550d63390d8ff4bc8b91ccb00e9da00f</id>
<content type='text'>
"b" flag is required to read binary files on Windows. 
https://www.lua.org/pil/21.2.2.html</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"b" flag is required to read binary files on Windows. 
https://www.lua.org/pil/21.2.2.html</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.1241: Ex command info contains confusing information</title>
<updated>2021-01-01T09:30:55+00:00</updated>
<author>
<name>Jan Edmund Lazo</name>
<email>jan.lazo@mail.utoronto.ca</email>
</author>
<published>2021-01-01T00:56:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f3c242c13cc9aaefd29f750d211fff76e1fada68'/>
<id>f3c242c13cc9aaefd29f750d211fff76e1fada68</id>
<content type='text'>
Problem:    Ex command info contains confusing information.
Solution:   When using the NOTADR flag use ADDR_OTHER for the address type.
            Cleanup code using NOTADR.  Check for errors in
            create_cmdidxs.vim.  Adjust Makefile to see the errors.
https://github.com/vim/vim/commit/b731689e85b4153af7edc8f0a6b9f99d36d8b011

Use Lua's "assert()" to make an invalid command definition
a compilation error.

Misc changes:

Remove 'RESTRICT' flag.
Neovim does not support "restricted" mode
since commit 7777532cebcfa9abc5ab2c7beae77f386feed3ca.

TODO:
Do not generate files before Lua assertions
so that CMake always runs the generator script
if the previous build has an invalid command definition.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Ex command info contains confusing information.
Solution:   When using the NOTADR flag use ADDR_OTHER for the address type.
            Cleanup code using NOTADR.  Check for errors in
            create_cmdidxs.vim.  Adjust Makefile to see the errors.
https://github.com/vim/vim/commit/b731689e85b4153af7edc8f0a6b9f99d36d8b011

Use Lua's "assert()" to make an invalid command definition
a compilation error.

Misc changes:

Remove 'RESTRICT' flag.
Neovim does not support "restricted" mode
since commit 7777532cebcfa9abc5ab2c7beae77f386feed3ca.

TODO:
Do not generate files before Lua assertions
so that CMake always runs the generator script
if the previous build has an invalid command definition.
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime/syntax: Fix highlighting of augroup contents (#9328)</title>
<updated>2018-12-08T00:16:58+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2018-12-08T00:16:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=bc132ae123d4dec1fa10e17981ff738e7b53cb20'/>
<id>bc132ae123d4dec1fa10e17981ff738e7b53cb20</id>
<content type='text'>
Comparing `vimCommand` from Vim's runtime/syntax/vim.vim, one can see
that "augroup" and similar commands are conspicuously missing. They are
handled specially (`vimAugroupKey`, `vimAutoCmd`).

Excluding them from the generated `vimCommand` keyword list, fixes their
highlighting.

closes #9327</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Comparing `vimCommand` from Vim's runtime/syntax/vim.vim, one can see
that "augroup" and similar commands are conspicuously missing. They are
handled specially (`vimAugroupKey`, `vimAutoCmd`).

Excluding them from the generated `vimCommand` keyword list, fixes their
highlighting.

closes #9327</pre>
</div>
</content>
</entry>
<entry>
<title>auevents.lua: keep events in alphabetical order</title>
<updated>2018-10-21T23:30:29+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2018-10-21T16:54:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=afd1d412fa912ed39b0dc37a66df6dd0b671ce91'/>
<id>afd1d412fa912ed39b0dc37a66df6dd0b671ce91</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>eval: use gperf to generate the hash of builtin functions</title>
<updated>2016-08-31T19:57:04+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2016-06-19T14:41:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7e2348f2b1b487c875bbcf6c6711a276f9063040'/>
<id>7e2348f2b1b487c875bbcf6c6711a276f9063040</id>
<content type='text'>
make api functions highlighted as builtins in vim.vim
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
make api functions highlighted as builtins in vim.vim
</pre>
</div>
</content>
</entry>
<entry>
<title>eval: Move VimL functions list to a lua file</title>
<updated>2016-08-31T19:40:20+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2016-01-01T09:17:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=8fb7273ac0b981eeb9afdc82675b908c1600d34f'/>
<id>8fb7273ac0b981eeb9afdc82675b908c1600d34f</id>
<content type='text'>
Removes all kinds of problems with sorting, provides a ready-to-use function
list representation for genvimvim.lua, does not require specifying function name
twice (VimL function name (string) + f_ function name).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removes all kinds of problems with sorting, provides a ready-to-use function
list representation for genvimvim.lua, does not require specifying function name
twice (VimL function name (string) + f_ function name).
</pre>
</div>
</content>
</entry>
</feed>
