-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Refactor duplicate logic in installers #430
Conversation
My thoughts:
Seems like a mixed bag to me. I like the reduced duplication moved to update_finish, but don't like the actual user experience effects. |
True that this benefits developers not users. Nevertheless I think this is something we have to do in order to move vim-plug forward. One option is to create a devel branch with this and to do experimental stuff on it. Here are my thoughts on the points you made.
Yes, we lose some parallelism here. But the commands are short-lived except for submodule updates. I have 58 plugins in my arsenal and this change makes
The experience is subjective and I can't argue with how you feel. But for me it's okay since the plugin's log line is eventually updated, and the fast changing line gives the feeling (or illusion?) that vim-plug is moving fast :)
This would be ideal, but I don't think Vimscript is thread-safe. I haven't tried it for a while, so maybe things have changed, but when I first started working on vim-plug, I experienced inexplicable crashes, and had to use locks around Vimscript block. I wonder if there's a guarantee that Vimscript is thread-safe. Ah, and even with this, since it's a vimscript, we can't have streaming output from submodule updates.
Yeah, this is pretty unfortunate. So I put a warning message, but that's not good enough. I had to extract submodule update because it should be done after branch/tag/commit is checked out. We're currently checking out commit after submodule update. This is a bug and it was my oversight. Hmm, we can consider using
After interrupt, for loops only touches plugins that we had succeeded to pull at the point. We can make it stop immediately if it makes more sense. |
Ya, you are right. I was thinking with my ideal thoughts rather than the one that remembers what things really are. VimL remains not thread safe so if we did do it in VImL we'd have to mutex the call from python/ruby slowing down the parallelism anyway. If only VimL had been thread safe all those years ago. I guess this is just one of those compromises, just makes me feel a bit "icky".
Yes, aware it is just successful ones. I meant more user might find multiple interrupts required odd. I do think most would prefer we finish the processing of successful plugins, even though it does render the interrupt less immediate, especially if testing things. |
2b11eab
to
47b73fa
Compare
47b73fa
to
3202651
Compare
Rebased and updated |
cf986f7
to
3b430dd
Compare
3b430dd
to
95a805b
Compare
9d7a8c2
to
333e609
Compare
This commit extracts duplicate logic out of three installers. Pros. - Better maintainability - Easier to add/extend the features - Fixes a bug when 'commit' option is used, submodules are updated before the designated commit is checked out Cons. - The whole process takes slightly longer due to lost parallelism after pull - Especially, submodule updates are not parallelized - However, this shouldn't matter much in practice as there are few plugins that heavily rely on submodules
333e609
to
eb47183
Compare
This commit extracts duplicate logic out of three installers; vimscript, ruby, and python.
Summary:
git fetch
orgit clone
is now done in Vimscript.Pros.
before the designated commit is checked out
Cons.
few plugins that heavily rely on submodules
No streaming output (or timeout) during submodule update