Windows was always an officially supported OS. However, Windows support comes at a great cost and I am not convinced that we currently are paying the cost. Therefore I would like to propose that we drop support for the Microsoft Compiler (MSVC).
To the best of my understanding FDB on Windows is pretty much untested. Just having a badly tested binary on the official download page is not very responsible. We also never look at compiler warnings on Windows, so even the theoretical benefit of having the code verified by another compiler toolchain is not that big of a benefit. But having a compiler and standard library with a potentially significantly different behavior seems risky.
I think the main reason we still officially support Windows (badly) is because people are generally afraid to cut features (and sometimes for good reasons).
I understand there’s value in being able to run FDB on Windows (mostly for development - I don’t think I would trust it enough to actually run a production system on Windows).
I wanted to know what others think? To be clear: I don’t think we should drop Windows support. However, I don’t think we should continue to compile with MSVC and instead find alternatives (they are ordered by amount of work it takes to make it happen).
Alternative One: Docker
This would be the easiest solution and probably also works: https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=Windows-Server
The main drawback is that this is virtualization. However, I would not be surprised if FDB in a VM is faster than FDB natively running on Windows. In fact I would be surprised if that wouldn’t be the case (I don’t believe we regularly run benchmarks on Windows).
Pros:
- Probably very limited amount of work - this should already be possible
- Probably the most robust solution - most of the testing is done on Linux and this will probably have the lowest number of changes compared to test and production systems out there.
Cons:
- High setup cost: for an application developer who want to build an application on top of FDB, setting up docker might be a high cost.
Alternative Two: WSL
The Linux subsystem for Windows can run Linux applications natively on Windows. This has more or less the same pros and cons to using Docker.
Alternative Three: Use Clang
Clang can build native Windows applications and is officially supported by Microsoft (you can even download it as part of Visual Studio).
Pros:
- We would use a tested toolchain. This would at least mitigate the risk that a different compiler would introduce new bugs or that the standard library would behave drastically differently
- We could still ship a normal Windows installer.
- This could potentially perform well - and maybe even better than a virtualized solution.
Cons:
- Everything in
Platform.cpp
would still be different - including theIAsyncFile
implementation - so there will still be need for proper testing. - We would still need to maintain a Windows build