-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Is it reproducible with SwiftPM command-line tools: swift build
, swift test
, swift package
etc?
- Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands,
swift build
,swift test
,swift package
etc.
Description
Module Aliasing has been implemented in Swift 5.7 with #4023, on the basis of SE-0339.
With #5602 integration tests have been added, but in Tests/FunctionalTests/ModuleAliasingFixtureTests.swift, only tests for DirectDeps1
and DirectDeps2
are coded, while in the folder, Fixtures/ModuleAliasing there is the code also for NestedDeps1
and NestedDeps2
. The latter two test cases fail to build with error
no such module 'Utils'
in AppPkg/Sources/App/main.swift
, in both of them.
Expected behavior
I would expect all test cases to be properly added to FunctionalTests
and those test cases, when executed, to be working.
Actual behavior
NestedDeps1
andNestedDeps2
cases from Fixtures/ModuleAliasing are not tested in Tests/FunctionalTests/ModuleAliasingFixtureTests.swift.NestedDeps1
andNestedDeps2
fail whenswift build --target App
is executed
Steps to reproduce
- Clone swiftlang/swift-package-manager repo;
- Open your Terminal and move to
Fixtures/ModuleAliasing/NestedDeps1/AppPkg
orFixtures/ModuleAliasing/NestedDeps2/AppPkg
; - Execute
swift build --target App
You should see an error like
6 | import Utils
| `- error: no such module 'Utils'
Swift Package Manager version/commit hash
Swift Package Manager - Swift 6.0.2-dev
Swift & OS version (output of swift --version ; uname -a
)
swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
Target: arm64-apple-macosx15.0
Darwin 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 arm64