You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not even sure if this is an issue, since I see no way around it. I upgraded plug, which pulled in 044c3a6.
Immediately after that I did :PlugUpdate. The oldplug#begin() was already finished (hence there's no s:triggers yet). This leads to:
Error detected while processing function <SNR>2_update..<SNR>2_update_impl..<SNR>2_update_finish..<SNR>2_finish.. plug#end:
line 22:
E121: Undefined variable: s:triggers
This means that s:update() already called the new definitions that rely on s:triggers, although I expected Vim to be using the old definitions, since the autoload file was already loaded.
This is my guess at least, since I don't see any other way of s:triggers not being defined otherwise.
If my guess is right, it's something that is documented wrongly (well, or a bug). I had no time to dive into the Vim sources yet.
Since it's more of a question than an issue, I'll close this one right away but hope for an answer anyway. :)
EDIT:
Nevermind. I followed all the functions of s:upgrade(), but totally overlooked the fact that :PlugUpgrade itself is sourcing the new file afterwards. So I understand what happens at least.
I guess one could argue, if resourcing is really needed after upgrades, since it can lead to such errors.
The text was updated successfully, but these errors were encountered:
Geez, looks like every time I introduce a new s: variable, I break clean upgrade. I should've added the default definition of it to the beginning of the plug.vim, even though it doesn't guarantee that the new code will work correctly, but unfortunately I forgot to do so. 2ee153d
Ideally, the purpose of PlugUpgrade is to upgrade vim-plug without requiring a restart of Vim, but in reality it may not work as expected especially when new s: variables are introduced :(
Hi!
I'm not even sure if this is an issue, since I see no way around it. I upgraded plug, which pulled in 044c3a6.
Immediately after that I did
:PlugUpdate
. The oldplug#begin()
was already finished (hence there's nos:triggers
yet). This leads to:This means that
s:update()
already called the new definitions that rely ons:triggers
, although I expected Vim to be using the old definitions, since the autoload file was already loaded.This is my guess at least, since I don't see any other way of
s:triggers
not being defined otherwise.If my guess is right, it's something that is documented wrongly (well, or a bug). I had no time to dive into the Vim sources yet.
Since it's more of a question than an issue, I'll close this one right away but hope for an answer anyway. :)
EDIT:
Nevermind. I followed all the functions of
s:upgrade()
, but totally overlooked the fact that:PlugUpgrade
itself is sourcing the new file afterwards. So I understand what happens at least.I guess one could argue, if resourcing is really needed after upgrades, since it can lead to such errors.
The text was updated successfully, but these errors were encountered: