Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown function: job_start #52

Closed
adamski opened this issue Jan 15, 2018 · 6 comments
Closed

Unknown function: job_start #52

adamski opened this issue Jan 15, 2018 · 6 comments

Comments

@adamski
Copy link

adamski commented Jan 15, 2018

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?

@wincent
Copy link
Owner

wincent commented Jan 16, 2018

What version of Neovim are you using? Ferret should only be calling job_start() in Vim, not Neovim.

@adamski
Copy link
Author

adamski commented Mar 6, 2018

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"

@wincent
Copy link
Owner

wincent commented Mar 6, 2018

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')

@adamski
Copy link
Author

adamski commented Mar 6, 2018

Thanks, the first command gives me

E121: Undefined variable: g:FerretNvim
E15: Invalid expression: g:FerretNvim

and the second shows 1, as expected.

@wincent
Copy link
Owner

wincent commented Mar 7, 2018

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.

@wincent
Copy link
Owner

wincent commented Dec 25, 2018

Closing this one due to inactivity but feel free to comment with more info if you'd like me to re-open it again.

@wincent wincent closed this as completed Dec 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants