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

Toolchain fails to build when Swift Package Manager contains a Swift Testing Tests #79113

Open
bkhouri opened this issue Feb 3, 2025 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels

Comments

@bkhouri
Copy link
Contributor

bkhouri commented Feb 3, 2025

Description

When Swift Package Manager contains a Swift Testing Tests, the OSS toolchain build contains compilation errors on swift Package Manager when building the tests.

/Users/ec2-user/jenkins/workspace/oss-swift-package-macos/swiftpm/Tests/BasicsTests/SampleTests.swift:1:8: error: no such module 'Testing'
import Testing
       ^

The Swift Testing test PR was reverted from Swift Package Manager swiftlang/swift-package-manager#8266, but we want to re-introduced the Swift Testing Canary test in Swift Package Manager ( see swiftlang/swift-package-manager#8267). However, if swiftlang/swift-package-manager#8267 is merged, the OSS toolchain will fail to build.

Looking the OSS Pipeline that failed, the swiftlang/swift/utils/build-script is executed and uses the build preset buildbot_osx_package.

The buildbot_osx_package preset has the mixin_osx_package_base preset, which specifies swift-testing and swift-testing-macros, in addition to specifying install-swift-testing and install-swift-testing-macros.

So the preset should contains swift testing. However, the build fails to find swift-testing.

Reproduction

To reproduce:

  1. Open swiftpm: Test only running host platform architecture #79074
  2. Trigger the macOS OSS toolchain build by posting the following comment
test with following PR:
https://github.com/swiftlang/swift-package-manager/pull/8267

@swift-ci build Toolchain macOS

Expected behavior

Once swiftlang/swift-package-manager#8267 is merged, an OSS toolchain build does not not cause a "no such module 'Testing'` compilation error.

Environment

Observed in the OSS CI pipeline .

Additional information

No response

@bkhouri bkhouri added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

1 participant