-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
Description
I ran into some strange initialization failures for the maktaba plugin when trying to bootstrap another plugin for testing. The error is Unknown function: maktaba#Maktaba and seems to be caused by a sort of circular dependency during setup. Not sure yet what specific circumstances make it blow up or not, since it's clearly not happening in day-to-day usage.
The failure scenario is:
- Calling an autoload function like
maktaba#IsAtLeastVersiontries to load autoload/maktaba.vim and maktaba tries toGetOrInstallitself atvim-maktaba/autoload/maktaba.vim
Line 26 in 46730b0
let s:maktaba = maktaba#plugin#GetOrInstall(s:plugindir) - That sources autoload/maktaba/plugin.vim which tries to call
maktaba#Maktaba:vim-maktaba/autoload/maktaba/plugin.vim
Line 903 in 46730b0
let s:maktaba = maktaba#Maktaba() - The call to
maktaba#Maktaba()fails because vim is still in the middle of sourcing autoload/maktaba.vim from the first step. It hasn't gotten through the definition ofmaktaba#Maktaba()or thes:pluginvariable it needs.