Just to make sure that I understand this correctly - does this also allow for conditional targets, if you group them under an umbrella target?
Let's take the example from the proposal, with two dependencies - bluetooth and bluetoothlinux. Imagine that these libraries vend a common API, and the author would like to merge the repositories. I'm guessing they would be able to do something like this:
let package = Package(
products: [ .library(name: "Bluetooth", targets: ["Bluetooth"]) ]
.target(name: "BT-mac", path: "Sources/backends/mac"),
.target(name: "BT-linux", path: "Sources/backends/linux"),
.product(name: "BT-mac", condition: .when(platforms: [.macOS])),
.product(name: "BT-linux", condition: .when(platforms: [.linux])),
And then, within the Bluetooth module, they can use
#if canImport(BT-mac) and
#if canImport(BT-linux) to implement their unifying abstraction.
And downstream users of the package will be able to write
import Bluetooth and that will "just work" when compiling for either mac or linux?