Skip to content

Module Aliasing Integration Tests not properly implemented #8114

@alessionossa

Description

@alessionossa

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

Steps to reproduce

  1. Clone swiftlang/swift-package-manager repo;
  2. Open your Terminal and move to Fixtures/ModuleAliasing/NestedDeps1/AppPkg or Fixtures/ModuleAliasing/NestedDeps2/AppPkg;
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions