packer.nvim icon indicating copy to clipboard operation
packer.nvim copied to clipboard

Don't print "Rollback to … completed" when "snapshot" is set in packer.init

Open nawordar opened this issue 2 years ago • 2 comments

I would like to have the same versions of plugins on each computer and I thought that the new "snapshot" option is perfect for that. I changed my config, so it now looks like this:

local packer = require 'packer'
local packer_util = require 'packer.util'
local join_paths = packer_util.join_paths

packer.init {
  snapshot = 'lock',
  snapshot_path = join_paths(stdpath 'data', 'packer_snapshots'),
}

return packer.startup(function(use)
  -- ...
end)

Now, after some time after opening Neovim, a Rollback to "/home/cezdro/local/.share/nvim/packer_snapshots/lock" completed appears which is annoying, especially that it does not show up immediately, but after a few seconds.

I suggest to only show that message when manually calling packer.rollback() or :PackerRollback or when some package versions changed after rolling back.

nawordar avatar Jun 03 '22 07:06 nawordar

I just found a related discussion: #914

nawordar avatar Jun 03 '22 07:06 nawordar

@nawordar I am also having similar issues, and it would seem that packer does something (security team at work reported some insane GitHub activity) each and every time nvim is restarted, i would have expected to be a one time thing when you set snapshot, packer will check out the commit for each plugin and be done with it, what it does is not even correct

I am also confused as to what the hell this message means, when i start nvim i expect the plugins to be at the commits specified in the snapshot, what appears to happen is that packer is doing this async and sometime after a few minutes you see the popup notification about the rollback, which is extremely confusing

asmodeus812 avatar Jun 15 '22 04:06 asmodeus812

@nawordar @asmodeus812 Agree with both of you . I think it is better that set a option to choose whether the load snapshot automatically or not .

allworldg avatar Jul 25 '22 02:07 allworldg