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

Implement Efficient Lockfile for Better Version Control and Faster Startup #1293

Open
5 of 8 tasks
tmc opened this issue Aug 1, 2024 · 1 comment
Open
5 of 8 tasks

Comments

@tmc
Copy link

tmc commented Aug 1, 2024

vim-plug would benefit from a lockfile system for the following reasons:

  1. Reproducible environments across machines
  2. Prevention of unexpected plugin updates
  3. Easier rollbacks to known-good states

The current snapshot feature, while useful, has limitations:

  • Slow startup times due to executing multiple git commands on each Vim launch
  • Doesn't prevent automatic updates during normal plugin operations

A lockfile approach would:

  • Store plugin commit hashes in a simple, fast-to-read format
  • Be checked during updates to determine if changes are needed
  • Only update plugins when explicitly requested or when the lockfile changes
  • Significantly reduce startup overhead compared to the current snapshot system

This feature would enhance vim-plug's utility for users prioritizing stability, reproducibility, and performance in their Vim/Neovim setups.

  • Type:
    • Bug
    • Enhancement
    • Feature Request
    • Question
  • OS:
    • All/Other
  • Vim:
    • Terminal Vim
    • GVim
    • Neovim
@tmc
Copy link
Author

tmc commented Aug 1, 2024

note: I know #954 was opened previously, this is effectively restarting that convo. The threat of a supply chain attack on vim plugins isn't impossible and I think we can make this project more secure pretty easily.

It would also be quite helpful to register programs to call on plugin updates when they do occur, so users can have an opportunity to perform additional security validation of new code arriving.

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

1 participant