neovim/runtime/lua/vim
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
..
filetype fix(filetype): correctly detect tex files 2022-12-31 20:54:01 -05:00
lsp fix(lsp): assert workspace/applyEdit receives params (#21945) 2023-01-22 18:54:09 +01:00
treesitter fix(treesitter): really restore syntax 2023-01-17 16:56:23 +00:00
_editor.lua docs(lua): fix treesitter parsing errors 2023-01-01 15:05:21 +01:00
_init_packages.lua feat: vim.inspect_pos, vim.show_pos, :Inspect 2022-12-17 13:05:31 +01:00
_inspector.lua feat: vim.inspect_pos, vim.show_pos, :Inspect 2022-12-17 13:05:31 +01:00
_meta.lua fix: vim.opt_local:append ignoring global option value (#21382) 2022-12-12 15:14:50 +00:00
diagnostic.lua feat(diagnostic): vim.diagnostic.is_disabled() #21527 2023-01-12 08:57:39 -08:00
F.lua docs(docstrings): fix runtime type annotations 2022-10-05 15:25:03 +02:00
filetype.lua vim-patch:9.0.1230: Apache Thrift files are not recognized (#21955) 2023-01-23 07:08:08 +08:00
fs.lua fix(fs): duplicate path separator #21509 2023-01-03 09:24:14 -08:00
health.lua health: migrate to Lua #21661 2023-01-16 01:55:24 -08:00
highlight.lua feat(lsp): initial support for semantic token highlighting 2022-12-08 11:31:56 -06:00
inspect.lua fix(inspect): escape identifiers that are lua keywords (#19898) 2022-08-23 13:02:55 +02:00
keymap.lua docs(gen): support language annotation in docstrings 2022-12-02 16:05:00 +01:00
lsp.lua refactor: format with stylua (#21821) 2023-01-15 16:00:23 +01:00
secure.lua fix(secure): crash when hitting escape in prompt (#21283) 2022-12-05 11:59:04 -07:00
shared.lua build: make generated source files reproducible #21586 2023-01-23 01:26:46 -08:00
treesitter.lua Merge pull request #21393 from folke/highlight_show 2022-12-17 13:43:46 +01:00
ui.lua docs(gen): support language annotation in docstrings 2022-12-02 16:05:00 +01:00
uri.lua chore: format runtime with stylua 2022-05-09 16:31:55 +02:00