Hello
I would like to know if it's possible to rename the product of a dependency.
Eg:
Let's say there's a repo "a" with a swift package with a library product with the name "A".
MyPackage will depend on A.
// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "MyPackage",
products: [
.library(
name: "MyPackage",
targets: ["MyPackage"]),
],
dependencies: [
.package(url: "git@gitlab.:foobar/a.git", from: "1.0.0"),
],
targets: [
.target(
name: "MyPackage",
dependencies: [ .product(name: "A", package: "a") ]),
]
)
And now in my App project - that depends on MyPackage - I can do:
include A
Question: I would like to rename A to something else like B. Is this possible?
I tried the following:
dependencies: [.product(name: "A", package: "a", moduleAliases: ["A", "B"])]),
But I get the following error:
empty or invalid module alias; ['A': 'B']