rbong / vim-flog

A blazingly fast, stunningly beautiful, exceptionally powerful git branch viewer for Vim/Neovim.
795 stars 22 forks source link

Error detected while compiling function flog#cmd#Flog[19] #111

Closed Halfwalker closed 1 year ago

Halfwalker commented 1 year ago

This is probably something simple ...

System is Ubuntu 20.04, with vim 9.0 (VIM - Vi IMproved 9.0 (2022 Jun 28, compiled May 10 2022 08:40:37))

LuaJit 2.1 installed cleanly

git clone https://luajit.org/git/luajit.git
cd luajit
make && sudo make install

luajit
LuaJIT 2.1.1695653777 -- Copyright (C) 2005-2023 Mike Pall. https://luajit.org/
JIT: ON SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink fuse

.vimrc has (among many other plugins)

Plugin 'tpope/vim-fugitive'
Plugin 'rbong/vim-flog'

When running :Flog it fails with this at the bottom

Error detected while compiling function flog#cmd#Flog[19]..flog#floggraph#buf#Update[21]..flog#graph#vim#Get[14]..function flog#cmd#Flog[19]..flog#floggraph#buf#Update[21]..flog#graph#vim
#Get[10]..FlogGetVimBinGraph:
line   27:
E909: Cannot index a special variable
rbong commented 1 year ago

Duplicate of #94 and others, unfortunately this is a bug with Vim itself in early versions of 9.0

Please update to a later version of Vim 9 if it's available on your system, if not you will have to compile Vim from source. Sorry about that.

One thing you can try if you don't want to compile from scratch is that sometimes a version of GVim comes with systems that has more flags enabled by default. This bug is only for external versions of LuaJIT, so if Vim is compiled with it built in you can use that instead. GVim comes with Vim so you can use either. If GVim is available on your system, and it comes with LuaJIT enabled, try it and put this in your .vimrc:

let g:flog_use_internal_lua = 1