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

Add support for Testing module #174

Open
marcprux opened this issue Sep 26, 2024 · 1 comment
Open

Add support for Testing module #174

marcprux opened this issue Sep 26, 2024 · 1 comment

Comments

@marcprux
Copy link
Contributor

Macros work with the latest swift 6 Android toolchain on a macOS host (🎉), but Testing is not included in the built SDK, resulting in errors when building a newly created skip package init project:

[2/12] Emitting module swift6_test_demoTests
/Users/marc/Desktop/swift6-test-demo/Tests/swift6-test-demoTests/swift6_test_demoTests.swift:1:8: error: no such module 'Testing'
1 | import Testing
  |        `- error: no such module 'Testing'
2 | @testable import swift6_test_demo
3 | 
[3/12] Compiling swift6_test_demoTests swift6_test_demoTests.swift
/Users/marc/Desktop/swift6-test-demo/Tests/swift6-test-demoTests/swift6_test_demoTests.swift:1:8: error: no such module 'Testing'
1 | import Testing
  |        `- error: no such module 'Testing'
2 | @testable import swift6_test_demo
3 | 

I had added --swift-testing --install-swift-testing to the build-script in #167 and added swift-testing to get-packages-and-swift-source.swift, hoping that would be enough to build and include the module, but that doesn't seem sufficient.

Is there some additional step that is needed to get the Testing.swiftmodule built and included?

@finagolfin
Copy link
Owner

No idea, I have never tried that new testing framework with Android and only tried it once or twice on linux. Given that cross-compiling packages with macros was broken, I figured there was no point since it wouldn't work and they only finally added it to the toolchain last month, swiftlang/swift#75515.

My guess would be that their build script requires some work on installation, if it built fine on the CI. Feel free to look into it if you want to use it, I've got other more important stuff to deal with.

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

2 participants