Unknown function: job_start
adamski opened this issue · 6 comments
I recently updated NeoVim, and am now getting the following error when calling :Ack
:
Error detected while processing function ferret#private#ack[9]..ferret#private#async#search:
line 4:
E117: Unknown function: job_start
E15: Invalid expression: job_start(l:command_and_args, { 'err_cb': 'ferret#private#async#err_cb', 'out_cb': 'ferret#private#async#out_cb', 'close_cb': 'ferret#
private#async#close_cb', 'err_mode': 'raw', 'out_mode': 'raw' })
I just updated to current master and still getting same error. Any clues?
What version of Neovim are you using? Ferret should only be calling job_start()
in Vim, not Neovim.
Output from --version
NVIM v0.2.2
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/tmp/neovim-20171118-53412-9ielcr/neovim-0.2.2/build/config -I/tmp/neovim-20171118-53412-9ielcr/neovim-0.2.2/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20171118-53412-9ielcr/neovim-0.2.2/build/src/nvim/auto -I/tmp/neovim-20171118-53412-9ielcr/neovim-0.2.2/build/include
Compiled by brew@Sierra-2.local
Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.2.2/share/nvim"
You can see the code that is checking to see whether to use the Neovim-specific path here. If you set g:FerretNvim
to 0, or for some reason has('nvim')
was returning false, then that would explain what you are seeing. You can check both of those with:
:echo g:FerretNvim
:echo has('nvim')
Thanks, the first command gives me
E121: Undefined variable: g:FerretNvim
E15: Invalid expression: g:FerretNvim
and the second shows 1, as expected.
Well that's pretty confusing then. This line should be returning true-ish, which means that on this line it invokes the Neovim codepath and not the alternative path.
You're dying on this line, but this function should never even be getting called.
I don't think there is an obvious bug here as this works fine for me on Neovim and Vim, and you've already established that your local config seems to be correct. At this point I don't think I can debug this remotely but perhaps I have given you enough context now to be able to dig in and figure out why the wrong path is getting executed (you could add some :echomsg
debug statements to trace the execution, and inspect them with :messages
if you wanted). Failing that, uninstalling and getting a clean install pointing at the HEAD
of the "master" branch might be a fix for you.
Closing this one due to inactivity but feel free to comment with more info if you'd like me to re-open it again.