I don't really understand the use case for WSL. What are the advantages? You could run a full Linux VM and do everything on it on any machine these days. Which is what I do, but I'm just an old school hack. Anyone who uses WSL care to enlighten me? Thanks!
WSL2 corrupting Git repositories and shell history
21–30 of 423 posts
Re: WSL2 corrupting Git repositories and shell history
#22More: - WSL2 sometime corrupt .zsh_history and git https://github.com/microsoft/WSL/issues/5026 - WSL2 corrupts ext4 filesystem https://github.com/microsoft/WSL/issues/5895
But why? WSL1 was something like wine but reverse, but WSL2 is actually linux.
A bigger problem would be if Hyper-V is either ignoring memory barriers, or caching writes to the disk and losing them when the Hyper-V service is shutdown. But that would likely affect more than just WSL, so we'd have seen the problem sooner (or so I vehemently hope).
Re: WSL2 corrupting Git repositories and shell history
#23The predecessor, WSL, "just worked" and it was more a less a linux experience for most practical purposes-- and certainly better than hoary old cygwin.
This caused a lot of people to believe they could just transition to WSL2, lead on by the promise of an even more performant linux experience. The documentation didn't say anything about complications from attempting this, so a lot of people just tried it as soon as they could, thinking it would go as smoothly as when they tried WSL. But nope... it many cases, it doesn't just work out of the box. There's network configuration and gateway issues, snags with vpn, and now this git repo corruption. When you look on git issues, it's just people randomly shot-gunning suggestions, some of which work, some of which don't. I think WSL2 was rushed out too early, or at least it's lacking a comprehensive troubleshooting guide to get it up and running.
Re: WSL2 corrupting Git repositories and shell history
#24I don't really understand the use case for WSL. What are the advantages? You could run a full Linux VM and do everything on it on any machine these days. Which is what I do, but I'm just an old school hack. Anyone who uses WSL care to enlighten me? Thanks!
To sell Windows laptops to the same crowd that buys Apple laptops to develop GNU/Linux software, instead of supporting Linux OEMs, and are unhappy that Apple only cares about developers on Apple ecosystem. Microsoft understood that they only care about having some kind of POSIX support, and nowadays being Linux compatible is more relevant than straight POSIX, as the BSDs and IllumniOS also found out with their compat…
Re: WSL2 corrupting Git repositories and shell history
#25I don't really understand the use case for WSL. What are the advantages? You could run a full Linux VM and do everything on it on any machine these days. Which is what I do, but I'm just an old school hack. Anyone who uses WSL care to enlighten me? Thanks!
a) It comes default with some network binding magic (ok, just configuration) that makes your WSL env almost actually behave like localhost. I know you can configure this yourself, but it's nice out of the box. (on the other hand, sometimes is this exactly the opposite of what you want...)
b) My main machine is a bit RAM constrained, and WSL2 will "magically" reclaim RAM when I close the consoles (unless I left something running...). Once again, not the biggest win, especially if you spec'd out your machine to run VMs, but still nice.
I think WSL2's biggest wins are not for 'full out development'. But it's nice when you need want to jump in and poke at something quickly in Linux land. The startup time for the console/VM is fast enough (~1-2 seconds), and the cleanup is good enough I can quickly jump between, without having a VM actually hanging around all the time.
I'm sure the file system integration is useful for some usecases... classic one would be if someone emails you data files or something. You download in your browser in Windows and then can access pretty seamlessly from WSL.
I think I would summarize WSL's advantages as being a bunch of little quality of life advantages that are very much suited for Windows dominant workflows that periodically jump into Linux.
There are all sorts of other disadvantages though - I would not recommend anyone who has a comfortable VM based workflow to ditch for WSL. An example of an uncomfortably stupid rough edge would be periodically time-desyncing: https://github.com/microsoft/WSL/issues/4149 . I shit you not, my workaround is to manually adjust my linux time forward and back with `sudo date --set "${INCREMENT} seconds" until it gets close enough that OAuth doesn't shit itself.
Re: WSL2 corrupting Git repositories and shell history
#26I don't really understand the use case for WSL. What are the advantages? You could run a full Linux VM and do everything on it on any machine these days. Which is what I do, but I'm just an old school hack. Anyone who uses WSL care to enlighten me? Thanks!
I have been teaching computer related classes to uni students for some time. Most of them run Windows. Running a virtual machine often means accessing the UEFI to be sure they have virtualization extensions enabled. And many of them have shitty personal laptops, which means running a VM will really slow the "Linux" experience. Sharing files between the host and the guest is also sometimes tricky, and I don't want to…
Note that this benefit applies to the deprecated WSL 1 only, WSL2 actually runs a VM underneath so it requires the same hoops that a VM would require.
Re: WSL2 corrupting Git repositories and shell history
#27I think calling it WSL2 was a mistake. The predecessor, WSL, "just worked" and it was more a less a linux experience for most practical purposes-- and certainly better than hoary old cygwin. This caused a lot of people to believe they could just transition to WSL2, lead on by the promise of an even more performant linux experience. The documentation didn't say anything about complications from attempting this, so a l…
Re: WSL2 corrupting Git repositories and shell history
#28I think calling it WSL2 was a mistake. The predecessor, WSL, "just worked" and it was more a less a linux experience for most practical purposes-- and certainly better than hoary old cygwin. This caused a lot of people to believe they could just transition to WSL2, lead on by the promise of an even more performant linux experience. The documentation didn't say anything about complications from attempting this, so a l…
Re: WSL2 corrupting Git repositories and shell history
#29I don't really understand the use case for WSL. What are the advantages? You could run a full Linux VM and do everything on it on any machine these days. Which is what I do, but I'm just an old school hack. Anyone who uses WSL care to enlighten me? Thanks!
Re: WSL2 corrupting Git repositories and shell history
#30I think calling it WSL2 was a mistake. The predecessor, WSL, "just worked" and it was more a less a linux experience for most practical purposes-- and certainly better than hoary old cygwin. This caused a lot of people to believe they could just transition to WSL2, lead on by the promise of an even more performant linux experience. The documentation didn't say anything about complications from attempting this, so a l…