head 1.2; access; symbols; locks; strict; comment @# @; 1.2 date 2026.05.03.18.21.52; author leot; state Exp; branches; next 1.1; commitid wpGpDlVynSPNHoEG; 1.1 date 2026.05.02.21.14.04; author leot; state Exp; branches; next ; commitid x7L81IhK7DvNGhEG; desc @@ 1.2 log @neovim: Add a simpler reproducer We can just call the undefined function to prove that it is undefined without calling its (at the moment) only user and managing packages. @ text @$NetBSD: patch-runtime_lua_vim_pack.lua,v 1.1 2026/05/02 21:14:04 leot Exp $ Avoid calling possible unavailable uv.available_parallelism(). At least on NetBSD with libuv-1.52.1 and lua51-luv-1.43.0.0nb1 seems not available. It can be easily triggered via: :lua =vim.uv.available_parallelism() --- runtime/lua/vim/pack.lua.orig 2026-05-02 20:51:52.218912310 +0000 +++ runtime/lua/vim/pack.lua @@@@ -507,7 +507,7 @@@@ end local copcall = package.loaded.jit and pcall or require('coxpcall').pcall local function async_join_run_wait(funs) - local n_threads = 2 * (uv.available_parallelism() or 1) + local n_threads = 2 * ((uv.available_parallelism and uv.available_parallelism()) or 1) --- @@async local function joined_f() async.join(n_threads, funs) @ 1.1 log @neovim: avoid to call possibly inexistent uv.available_parallelism() At least on NetBSD with libuv-1.52.1 and lua51-luv-1.43.0.0nb1 seems not available and it can be triggered by using vim.pack.add(). Noticed while rerunning neovim with an empty state so that vim.pack.add() actually run. @ text @d1 1 a1 1 $NetBSD$ d6 3 a8 1 not available and it can be triggered by using vim.pack.add(). @