-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
We keep breaking the Windows port whenever we land a new feature for Darwin and/or Linux. This needs to stop.
There is absolutely no reason the Windows port of swift-system needs to be built from the same sources (or provide the same APIs) as UN*X systems; in fact, this is detrimental to the objective of this project and only serves to make it more difficult/error-prone to maintain this package. To a lesser extent, this is also true of Linux vs Darwin.
- Set up platform-specific directories under Sources/ and Tests/. Explicitly exclude source files that wrap POSIX/Darwin/Linux syscalls from the Windows build, and vice versa.
- For cases where code sharing across platforms actually makes sense (i.e. some POSIX calls on Linux & Darwin), set up a POSIX/ platform directory, and include the sources therein in both the Darwin and Linux builds. If we want to keep some parts of the implementation of
FilePathshared across all platforms, then move those parts into ashared/orcommon/subdirectory. - Just like the actual build, tests are platform specific, and they need to be configured accordingly. The test suite in this package is currently completely broken on Windows.
- Never, ever, pretend that Windows implements POSIX system calls.
Jumhyn, karwa, lin72h, lxbndr and dcantah