From e3ffcff7cce1206a2e41b413b0923a3aafeb9306 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 29 Dec 2022 08:01:05 +0100 Subject: [PATCH] fix(cache): ad jit.verion to cache version string. Fixes #225 --- lua/lazy/core/cache.lua | 2 +- lua/lazy/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/cache.lua b/lua/lazy/core/cache.lua index db57317..f2daeee 100644 --- a/lua/lazy/core/cache.lua +++ b/lua/lazy/core/cache.lua @@ -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 = { diff --git a/lua/lazy/init.lua b/lua/lazy/init.lua index ff9f51b..bfb475e 100644 --- a/lua/lazy/init.lua +++ b/lua/lazy/init.lua @@ -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()