diff options
| author | bfredl <bjorn.linse@gmail.com> | 2025-05-02 10:34:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-02 10:34:25 +0200 |
| commit | da401ca25b4dbef121da627fdcdc1dbaf8b7e092 (patch) | |
| tree | 53a37c82e5e7298a30c4809c452926aa0a31fa5b /src/gen/gen_api_dispatch.lua | |
| parent | ce8b755a86c10496a81675c49b3bc9a42c79d80f (diff) | |
| parent | 1f004970f00bd8ef7ad955b52857df136f82185b (diff) | |
| download | rneovim-da401ca25b4dbef121da627fdcdc1dbaf8b7e092.tar.gz rneovim-da401ca25b4dbef121da627fdcdc1dbaf8b7e092.tar.bz2 rneovim-da401ca25b4dbef121da627fdcdc1dbaf8b7e092.zip | |
Merge pull request #28344 from bfredl/wonderland
feat(build): build.zig MVP: build and run functionaltests on linux
Diffstat (limited to 'src/gen/gen_api_dispatch.lua')
| -rw-r--r-- | src/gen/gen_api_dispatch.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gen/gen_api_dispatch.lua b/src/gen/gen_api_dispatch.lua index b5433527bc..6480e66489 100644 --- a/src/gen/gen_api_dispatch.lua +++ b/src/gen/gen_api_dispatch.lua @@ -11,8 +11,6 @@ local mpack = vim.mpack local hashy = require 'gen.hashy' -local pre_args = 7 -assert(#arg >= pre_args) -- output h file with generated dispatch functions (dispatch_wrappers.generated.h) local dispatch_outputf = arg[1] -- output h file with packed metadata (api_metadata.generated.h) @@ -23,6 +21,11 @@ local lua_c_bindings_outputf = arg[4] -- lua_api_c_bindings.generated.c local keysets_outputf = arg[5] -- keysets_defs.generated.h local ui_metadata_inputf = arg[6] -- ui events metadata local git_version_inputf = arg[7] -- git version header +local nvim_version_inputf = arg[8] -- nvim version +local dump_bin_array_inputf = arg[9] +local dispatch_deprecated_inputf = arg[10] +local pre_args = 10 +assert(#arg >= pre_args) local functions = {} @@ -152,7 +155,7 @@ end -- Export functions under older deprecated names. -- These will be removed eventually. -local deprecated_aliases = require('nvim.api.dispatch_deprecated') +local deprecated_aliases = loadfile(dispatch_deprecated_inputf)() for _, f in ipairs(shallowcopy(functions)) do local ismethod = false if startswith(f.name, 'nvim_') then @@ -244,7 +247,7 @@ for x in string.gmatch(ui_options_text, '"([a-z][a-z_]+)"') do table.insert(ui_options, x) end -local version = require 'nvim_version' -- `build/nvim_version.lua` file. +local version = loadfile(nvim_version_inputf)() local git_version = io.open(git_version_inputf):read '*a' local version_build = string.match(git_version, '#define NVIM_VERSION_BUILD "([^"]+)"') or vim.NIL @@ -302,7 +305,7 @@ for i, item in ipairs(types) do end local packed = table.concat(pieces) -local dump_bin_array = require('gen.dump_bin_array') +local dump_bin_array = loadfile(dump_bin_array_inputf)() dump_bin_array(api_metadata_output, 'packed_api_metadata', packed) api_metadata_output:close() |