Skip to content

Commit a56bf00

Browse files
authored
fix: support LuaJIT versions with neovim 0.9.2 and 0.10.x (#518)
neovim 0.10 has bumped up LuaJIT version, which makes plenary.profile fail to work due to the "LuaJIT core/library version mismatch" error. We can have an allowed range for `jit.version_num` as 20100~20199. FYI, `require('jit')` reports: nvim-0.9.1: version = "LuaJIT 2.1.0-beta3", version_num = 20100 nvim-0.10.x (HEAD version as of today, an example): version = "LuaJIT 2.1.1693268511", version_num = 20199
1 parent 0dbe561 commit a56bf00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/plenary/profile/p.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
-- Cache some library functions and objects.
4343
local jit = require("jit")
44-
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
44+
assert(20100 <= jit.version_num and jit.version_num <= 20199, "LuaJIT core/library version mismatch: " .. jit.version)
4545
local profile = require("jit.profile")
4646
local vmdef = require("jit.vmdef")
4747
local math = math

0 commit comments

Comments
 (0)