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

use case: restorable state #4

Open
matu3ba opened this issue Jul 15, 2022 · 2 comments
Open

use case: restorable state #4

matu3ba opened this issue Jul 15, 2022 · 2 comments

Comments

@matu3ba
Copy link

matu3ba commented Jul 15, 2022

Is having a history of git hashes with restoring them + locking in scope of the plugin?

This would make it trivial to vendor stuff yourself (copy-paste the repo and do git checkout to last known working version) and reproduce issues like what is possible in nix flake configurations that store the accurate source version in the lockfile.

It looks like nix flakes need still quite a long time to get stable.

see also nvim-lua/wishlist#10
and
https://github.com/wbthomason/packer.nvim#performing-plugin-management-operations (snapshot and rollback)

@ii14
Copy link
Owner

ii14 commented Jul 15, 2022

I plan to add a lockfile, so you can just add it to your dotfiles, and yes, the intention is so when you install plugins the state of plugins from that lockfile is restored. I don't think it's going to be fundamentally that much different from what you already have in vim-plug or packer.nvim, it's just that it's going to be defined in a different place.

I've considered storing the history of the updates you've made too (if that's what you're asking about), but I think it's going to be better to just leave it for git's reflog to handle. So you have the overall history saved in your dotfiles commit history, and a more granular one locally through git reflog.

But as of right now, checking out commits, branches and tags is not even implemented yet.

@ii14
Copy link
Owner

ii14 commented Jul 15, 2022

Actually I don't even know why I even named it a "lockfile", that's probably a wrong name. The equivalent of npm's package.json, package-lock.json or whatever it's called, where you can specify the exact versions.

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