Files
swift-mirror/test/Serialization/restrict-swiftmodule-to-channel.swift
Alexis Laferrière 020d5784df Serialization: reword diagnostic about serialization channel mismatch
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.
2024-08-15 13:29:10 -07:00

5.4 KiB