neovim/scripts
Arnout Engelen cb757f2663
build: make generated source files reproducible #21586
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
> The order in which the indices are enumerated is not specified [...]
>
>> The hardening of the VM deliberately randomizes string hashes. This in
>> 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 <gocdundar@gmail.com>
Co-Authored-By: Arnout Engelen <arnout@bzzt.net>
2023-01-23 01:26:46 -08:00
..
bump_deps.lua refactor: eliminate bump-deps.sh using "nvim -l" 2023-01-07 02:47:18 +01:00
check_urls.vim vim-patch: move test_urls.vim out of runtime/ 2018-11-12 12:36:40 -05:00
cliff.toml chore: forward-port changes from v0.8.2 release 2022-12-29 17:36:28 +01:00
download-unicode-files.sh build(lintsh): double quote to prevent word splitting (#21571) 2022-12-28 22:50:24 +01:00
gen_filetype.lua feat: filetype.lua (#16600) 2022-01-04 07:28:29 -07:00
gen_help_html.lua docs: treesitter.add_directive, add_predicate #21206 2023-01-16 04:39:19 -08:00
gen_vimdoc.py feat(lua)!: execute Lua with "nvim -l" 2023-01-05 17:10:02 +01:00
genappimage.sh build(lint): add more shell scripts to lintsh 2022-11-01 18:37:21 +01:00
genvimvim.lua build: make generated source files reproducible #21586 2023-01-23 01:26:46 -08:00
git-log-pretty-since.sh build(lint): add more shell scripts to lintsh 2022-11-01 18:37:21 +01:00
legacy2luatest.pl legacy2luatest: Use before_each instead of setup. 2016-02-01 09:09:08 +01:00
lintcommit.lua ci(lintcommit): enforce common scope names #20393 2022-10-24 04:24:08 -07:00
lua2dox.lua feat(lua)!: execute Lua with "nvim -l" 2023-01-05 17:10:02 +01:00
movedocs.pl Move documentation from function declarations to definitions 2014-06-02 11:04:04 -03:00
pvscheck.sh docs: fix typos 2022-11-02 21:45:26 +08:00
release.sh build(lint): add more shell scripts to lintsh 2022-11-01 18:37:21 +01:00
shadacat.py Merge #11319 'inccommand: fix issues with modifiers and prompting' 2019-11-05 17:34:21 -08:00
update_terminfo.sh build(lint): add more shell scripts to lintsh 2022-11-01 18:37:21 +01:00
vim-patch.sh feat!: remove hardcopy 2023-01-03 10:07:43 +00:00
vimpatch.lua vim-patch: bump VIM_VERSION from 8.0 => 8.1 #20762 2022-10-21 03:56:09 -07:00
windows.ti fix(terminfo): disable smglr for vtpcon and conemu (#18855) 2022-06-05 14:39:56 +02:00