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.
dlisboa · · focus · HN ↗
That's the wrong way to look at it. NeoVIM has a different concept of care for their users. They're optimizing for another kind of care, more in line with modern expectations, which VIM did not care about (hence the fork).
It's not better or worse, just different.
This same article could've been written about how VIM has no native LSP integration or autocomplete and they don't have duty or care for their users.
pdonis · · focus · HN ↗
luma · · focus · HN ↗
jeremyjh · · focus · HN ↗
phoghed · · focus · HN ↗
tehwebguy · · focus · HN ↗
phoghed · · focus · HN ↗
sebzim4500 · · focus · HN ↗
MaxBarraclough · · focus · HN ↗
* <a href="https://news.ycombinator.com/item?id=49867678">https://news.ycombinator.com/item?id=49867678
* <a href="https://bastian.rieck.me/blog/2015/persistent_undo_vim/" rel="nofollow">https://bastian.rieck.me/blog/2015/persistent_undo_vim/
webstrand · · focus · HN ↗
nikanj · · focus · HN ↗
crote · · focus · HN ↗
Persistent undo exists to recover from an accidental write-and-quit mid-session nuking some stuff you really didn't intend to delete. If you care about its contents beyond a handful of hours, you either need to adopt proper version management, or start making backups.
Reading the PR the change was needed because the old undofile format was fundamentally broken. They considered making an undofile-upgrade mechanism, but it would've caused more issues that it would've solved. In other words: stuck between a rock and a hard place.
A duty of care also means occasionally having to break things to make it better, or else you end up being stuck with spacebar heating[0] forever. As a user it does suck, but that's the price you have to pay for using actively-developed software.
[0]: <a href="https://xkcd.com/1172/" rel="nofollow">https://xkcd.com/1172/
pdonis · · focus · HN ↗
That's one use case, sure, but not the only possible one.
> Reading the PR the change was needed because the old undofile format was fundamentally broken.
That's a good reason to have a new undo file that's completely separate from the old one, and use the new one instead, and tell users "Hey, whatever undo information you had in your old undo file isn't accessible any more through neovim, you'll have to use vim if you need to get to it."
It's not a good reason for just deleting the old undo file with no warning. All the new version needs to do is ignore it, not nuke it.
applfanboysbgon · · focus · HN ↗
"All software should be shit because most software is shit"
soraminazuki · · focus · HN ↗
xigoi · · focus · HN ↗
soraminazuki · · focus · HN ↗
<a href="https://news.ycombinator.com/item?id=49869740">https://news.ycombinator.com/item?id=49869740
jeremyjh · · focus · HN ↗
dlisboa · · focus · HN ↗
Relax for a second. Get some perspective.
jeremyjh · · focus · HN ↗
em-bee · · focus · HN ↗
kelnos · · focus · HN ↗
Sure, maybe they should have backed it up or used a different directory, but I think it's reasonable to expect that many people wouldn't. If a software developer is only going to consider the scenario where their users are thinking/behaving exactly as they are, then they aren't particularly good at what they're doing.
em-bee · · focus · HN ↗
neovim: by default they are saved to the dedicated directory in the application data folder
I think a user could be forgiven for assuming that it was fine to use the same value when trying out a migration from vim to neovim
neovim would also overwrite its own old version of the file. the point is that the expectation that neovim should watch out for files that are used by other applications is in my opinion not reasonable. it won't even watch out for its own old undo files.
users may have the expectation that neovim and vim are compatible, but that expectation is simply not entirely fulfilled. you can't share config files unless you have some minimal ones that just happen to work. so why would you be able to share other files?
the question is, how are these expectations formed, and what is reasonable to expect?
when it started out neovim was very compatible with vim. but from my experience with FOSS and based on the stated goal of neovim at least to me it was clear that compatibility was not going to last. not everyone shares that experience, and thus their expectations are different. neovim should perhaps make that more clear and for one be aware that people expect compatibility and warn users accordingly. an argument could be made that if a user changes the undodir value, there is a higher chance that they may try to use the same for vim. but then vim devs would need to do that too.
but does not considering that make devs not good at what they are doing? i don't think so. for one, if someone thinks the devs are not good enough they should stop using neovim (as some people here in the thread announced they are doing. their choice). personally i think this is average for FOSS and good enough. we can't expect everyone to be perfect. the correct response to an issue besides reporting it is not to complain but to contribute a fix.
zeratax · · focus · HN ↗
<a href="https://github.com/neovim/neovim/pull/13973#issuecomment-879067052" rel="nofollow">https://github.com/neovim/neovim/pull/13973#issuecomment-879...
>> It shouldn't overwrite an unreadable file tho, unless I have completely misread the code.
> It doesn't, but because it reads the vim-specific config file from the vim-specified location it then writes a file in that location with the name that vim expects, so files that I first edited in neovim ended up with undo files that vim couldn't read and vice versa. Both programs complained.
[deleted] · · focus · HN ↗
[deleted]
kebman · · focus · HN ↗
```markdown
abhorrent
/əbˈhɒr(ə)nt/
Abhorrent is an adjective that means morally very bad, hateful, or causing strong disgust and loathing.
```
I realise that this causes strong disgust and loathing in you, but can you please expand upon how it's morally very bad to prioritise speed and ease of use over undelete capability in Neovim? Are you unable to make backups or use Git?
overfeed · · focus · HN ↗
> Are you unable to make backups or use Git?
Ah yes, the old perty theft justification as applied to intentionally-inflicted data loss; "They won't mind if I take/delete this, they (should) have insurance".
oh_my_goodness · · focus · HN ↗
On that board, silently deleting a user's files is obviously justified. What would be out of line is complaining about software silently deleting user files.
[1] Long ago. Galaxy far away.
lokar · · focus · HN ↗
dlisboa · · focus · HN ↗
People are making it sound like this is a huge company with a product and not a grouping of curious people with a couple hours of free time on a Sunday.
Most likely they never thought about it, then it broke, then it was not impactful enough to fix on their free time compared to other stuff.
jeremyjh · · focus · HN ↗
<a href="https://github.com/neovim/neovim/pull/13973#issuecomment-789262094" rel="nofollow">https://github.com/neovim/neovim/pull/13973#issuecomment-789...
roryirvine · · focus · HN ↗
If it's really just a toy with no expectation of not unexpectedly destroying user data then they ought to make that more clear.