nvim-telescope / telescope.nvim

Find, Filter, Preview, Pick. All lua, all the time.
MIT License
16.09k stars 842 forks source link

Broken when using Lua5.1 #518

Open mirachan010 opened 3 years ago

mirachan010 commented 3 years ago

Description

Can't move in aarch64(RaspberryPi4-8GB) neovim from apt. This neovim is use Lua5.1 not LuaJIT.

Expected Behavior

in use :Telescope give some completion.

Actual Behavior

echo some error

:Telescope ...
Error detected while processing function <SNR>36_telescope_complete:
line    1:
E5108: Error executing lua ...k/packer/start/plenary.nvim/lua/plenary/filetype.lua:1: loop or previous error
loading module 'plenary.path'
line    4:
E5108: Error executing lua ...acker/start/telescope.nvim/lua/telescope/command.lua:2: loop or previous error
loading module 'telescope.builtin'
line    6:
E712: Argument of extend() must be a List or Dictionary
line   11:
E714: List required
:Telescope 0

Details

Reproduce 1. nvim -nu test.vim 2. `:Telescope ` OR `:Telescope oldfiles`
Environment - nvim --version output: ``` NVIM v0.5.0-dev Build type: RelWithDebInfo Lua 5.1 Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-3iA3FB/neovim-0.5.0+ubuntu2+git202102080233-02a3c4179-d569569c9=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-3iA3FB/neovim-0.5.0+ubuntu2+git202102080233-02a3c4179-d569569c9/build/config -I/build/neovim-3iA3FB/neovim-0.5.0+ubuntu2+git202102080233-02a3c4179-d569569c9/src -I/build/neovim-3iA3FB/neovim-0.5.0+ubuntu2+git202102080233-02a3c4179-d569569c9/.deps/usr/include -I/usr/include -I/build/neovim-3iA3FB/neovim-0.5.0+ubuntu2+git202102080233-02a3c4179-d569569c9/build/src/nvim/auto -I/build/neovim-3iA3FB/neovim-0.5.0+ubuntu2+git202102080233-02a3c4179-d569569c9/build/include Compiled by buildd@bos02-arm64-058 Features: +acl +iconv +tui See ":help feature-compile" system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim" Run :checkhealth for more info ``` - Operating system: Ubuntu 20.04.2 LTS - Telescope commit:
Configuration

```viml -- Auto install packer.nvim if not exists local install_path = vim.fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim' if vim.fn.empty(vim.fn.glob(install_path)) > 0 then -- use mirachan010/packer.nvim for use Lua5.1 not LuaJIT vim.api.nvim_command('!git clone -b patch-1 https://github.com/mirachan010/packer.nvim '..install_path) vim.cmd('packadd packer.nvim|lua require\'aa\'.compile() require\'aa\'.install()') end local packer = nil local function init() if packer == nil then packer = require('packer') packer.init({ display={ open_fn = require'packer.util'.float, } }) end local use = packer.use packer.reset() use { 'mirachan010/packer.nvim', opt = true, branch = 'patch-1' } use { 'nvim-telescope/telescope.nvim', requires = { {'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'} } } end local plugins = setmetatable({}, { __index = function(_, key) init() return packer[key] end }) return plugins ```

Conni2461 commented 3 years ago

We still have some jit stuff in plenary.path. I will remove them as soon as possible and make sure Lua 5.1 works. But it will not work as good as the jit version. We need it for some ffi stuff. E.g. we no longer can shorten the path without jit: https://github.com/nvim-telescope/telescope.nvim/blob/993e383dd5356bf10c5cf2b5d0ac88f9c7746181/lua/telescope/path.lua#L23-L45

So i highly suggest you build Neovim with luajit.

I will edit the title. Its not really broken for this platform, it works on my raspberry pi 4.

Conni2461 commented 3 years ago

Does this still happen? I have removed the jit part in plenary.path :) I haven't build neovim with lua5.1 yet

mirachan010 commented 3 years ago

It has other error.

Telescope ...
Error detected while processing function <SNR>24_telescope_complete:
line    1:
E5108: Error executing lua vim.lua:119: ...site/pack/packer/start/telescope.nvim/lua/telescope/builtin/internal.lua:741: '=' expected near 'line_parsed'
line    4:
E5108: Error executing lua ...acker/start/telescope.nvim/lua/telescope/command.lua:2: loop or previous error loading module 'telescope.builtin'
line    6:
E712: Argument of extend() must be a List or Dictionary
line   11:
E714: List required
:Telescope 

I can't install and build lua jit version https://github.com/neovim/neovim/issues/13760

fibonascii commented 3 years ago

After switching to vim-plug from bundle this error stopped popping up. Per the information on this issue this is what fixed it for me

brew install luajit brew reinstall neovim

juru1234 commented 4 months ago

@Conni2461 Is this still a thing you are working on? There some architectures out there that doesn't support LuaJIT and therefore use Lua 5.1. Mainly because the LuaJIT maintainer blocks PR's. The neovim team sadly doesn't want to replace luajit with luajit2 upstream.