fix(cache): ad jit.verion to cache version string. Fixes #225

This commit is contained in:
Folke Lemaitre 2022-12-29 08:01:05 +01:00
parent 95b9cf743c
commit e3ffcff7cc
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ local uv = vim.loop
local M = {}
M.dirty = false
M.VERSION = "1"
M.VERSION = "1" .. jit.version
---@class LazyCacheConfig
M.config = {

View File

@ -20,7 +20,7 @@ function M.setup(spec, opts)
if vim.fn.has("nvim-0.8.0") ~= 1 then
return vim.notify("lazy.nvim requires Neovim >= 0.8.0", vim.log.levels.ERROR, { title = "lazy.nvim" })
end
if not pcall(require, "ffi") then
if not (pcall(require, "ffi") and jit and jit.version) then
return vim.notify("lazy.nvim requires Neovim built with LuaJIT", vim.log.levels.ERROR, { title = "lazy.nvim" })
end
local start = vim.loop.hrtime()