neovim/test/functional
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
..
api Merge #21844 test: avoid noise in test logs 2023-01-16 18:38:20 -05:00
autocmd refactor: remove E5500, adjust tests 2023-01-16 18:03:08 +08:00
core refactor(tests): lift retry() into assert_log() 2023-01-17 00:19:30 +01:00
editor fix(completion): correct what modes support fuzzy completion 2023-01-17 15:55:58 +08:00
ex_cmds test: add more tests for Unicode 2023-01-09 17:11:39 +08:00
fixtures build: use modern cmake (#21589) 2023-01-10 18:49:57 +01:00
legacy test(syn_attr_spec): add more information (#21912) 2023-01-20 10:03:29 +08:00
lua build: make generated source files reproducible #21586 2023-01-23 01:26:46 -08:00
options fix: failing XDG test on Windows CI 2023-01-17 01:57:52 +01:00
plugin dist: transpile cfilter.vim => cfilter.lua #21662 2023-01-08 12:31:38 -08:00
provider fix(clipboard): show provider warning when not during batch changes #21451 2023-01-03 15:17:54 -08:00
shada test: simplify platform detection (#21020) 2022-11-22 08:13:30 +08:00
terminal fix(remote): don't leak memory on failure to connect to server (#21931) 2023-01-21 18:54:17 +08:00
treesitter feat(treesitter): show filetype associated with parser (#17633) 2023-01-22 16:51:17 +01:00
ui fix(extmarks): problems with folded virtual lines (#21930) 2023-01-23 07:43:04 +08:00
vimscript refactor(tests): lift retry() into assert_log() 2023-01-17 00:19:30 +01:00
example_spec.lua screen.lua: remove screen:_on_event #11488 2019-12-01 01:06:10 -08:00
helpers.lua refactor(tests): lift retry() into assert_log() 2023-01-17 00:19:30 +01:00
preload.lua test: remove unused variable (#21552) 2022-12-29 07:20:42 +08:00