On caring for user data: NeoVim caused Vim undo files to be deleted
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
On caring for user data: NeoVim caused Vim undo files to be deleted
Unofficial Hacker News client; not affiliated with Y Combinator.
jeremyjh · · focus · HN ↗
1. The change would break undo history, for both Neovim and Vim [see edit: this is not the really the case]
2. This means Neovim would delete data created by a different program, on another user's computer.
3. This was known before the feature was released.
4. They did it anyway.
I don't think there can really be any post-hoc justification of this.
<a href="https://github.com/neovim/neovim/pull/13973#issuecomment-789262094" rel="nofollow">https://github.com/neovim/neovim/pull/13973#issuecomment-789...
edit: I missed an important detail. The user specified the same path for undodir in both nvim and vim. Vim requires a path to enable the feature - there is no shared default path. The user sharing a path changes the story considerably in my view, because now this is a case of nvim deleting data created by nvim as an alternative to writing a data migration for it.
I could still disagree with that, but it makes alternatives like "just use a different path" more complicated at a minimum and really changes my read of this situation completely. I think Neovim's decisions are justfiable in this context. Maybe they could have saved the contents of the old undo folder somewhere and notified the user - arguably that would be more empathic I don't really agree they had a moral duty to do this.
dtech · · focus · HN ↗
It seems the author has too high expectations of this feature, or vim is using an incorrect path to store this is they want to make it available more reliably
soraminazuki · · focus · HN ↗
<a href="https://github.com/neovim/neovim/blob/fc3f0041fbe01c96f38224d65d27664b22b5ef78/runtime/doc/options.txt#L7146" rel="nofollow">https://github.com/neovim/neovim/blob/fc3f0041fbe01c96f38224...
The feature that was broken is called persistent undo. The feature was inherited from Vim. In case it's not obvious from the name, nowhere does it state in the docs for persistent undo that data may be deleted at any time.
<a href="https://neovim.io/doc/user/undo/#persistent-undo" rel="nofollow">https://neovim.io/doc/user/undo/#persistent-undo
That Neovim changed the default storage path for undo files is completely irrelevant to whether the contract for persistence should be broken.