Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use different module aliases of dependency in the same package #8119

Open
ahoppen opened this issue Nov 14, 2024 · 0 comments
Open

Cannot use different module aliases of dependency in the same package #8119

ahoppen opened this issue Nov 14, 2024 · 0 comments

Comments

@ahoppen
Copy link
Member

ahoppen commented Nov 14, 2024

If you have a package with two targets like

.target(
name: "LibA",
dependencies: [.product(name: "Crypto", package: "swift-crypto")]
),

.target(
name: "LibB",
dependencies: [.product(name: "Crypto", package: "swift-crypto", moduleAliases: ["Crypto": "CryptoAlias"])]
),

then compilation will fail with error: no such module 'CryptoAlias'. We should be building swift-crypto twice, once with the module alias and once without so that both LibA and LibB can build.

test.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant