This diagnostic reports when two compilers that are marked as targetting
different distribution channels try to read swiftmodules produced by the
other one. For a resilient module, this error is usually silently ignored
as the reader compiler picks the swiftinterface over the swiftmodule.
It is visibile to the end user when the module is non-resilient.
For such a case, we here try to improve the diagnostic to be more
meaningful.
The new diagnostics looks like so:
```
import ChannelLib // error: the binary module for 'ChannelLib' was compiled
// for 'restricted-channel', it cannot be imported by the
// current compiler which is aligned with 'other-channel'.
// Binary module loaded from path: .../ChannelLib.swiftmodule
```
Vendors should be mindful to pick meaningful channel names
to guide users in the direction of the actual solution.
There are scenarios where different compilers are distributed with
compatible serialization format versions and the same tag. Distinguish
swiftmodules in such a case by assigning them to different distribution
channels. A compiler expecting a specific channel will only read
swiftmodules from the same channel. The channels should be defined by
downstream code as it is by definition vendor specific.
For development, a no-channel compiler loads or defining the env var
SWIFT_IGNORE_SWIFTMODULE_REVISION skips this new check.
rdar://123731777