I'm writing a Swift service that I will be deploying to several Linux servers. I'm developing the service on my Macbook Pro, with VS Code/sourcekit-lsp. When I click through to definitions of things, I'm (obviously) taken to the Darwin Foundation definitions.
The helpful advice over on GitHub - swift-server/guides: Guides for building, debugging and deploying Swift Server applications is that it's...critical to test on Linux.
Swift supports architecture-specific code. By default, Foundation imports architecture-specific libraries like Darwin or Glibc. While developing on macOS, you may end up using APIs that are not available on Linux. Since you are most likely to deploy a cloud service on Linux, it is critical to test on Linux.
Obviously, I can't account for every difference, but it'd go a long way to be able to compile against swift-corelibs-foundation (and have sourcekit go to those definitions, so I can see ahead of time what will give me an unimplemented exception).
I understand that the usual mode should certainly to be compiling/linking against the native Foundation, but when targeting Linux, it'd be great to use corelibs-foundation...