pointfreeco / swift-snapshot-testing

📸 Delightful Swift snapshot testing.
https://www.pointfree.co/episodes/ep41-a-tour-of-snapshot-testing
MIT License
3.79k stars 581 forks source link

Compile error in 1.17.4 with Xcode 16.1.0 Beta: Missing required module 'Testing' #900

Closed JRR-OSU closed 2 months ago

JRR-OSU commented 2 months ago

Hi all,

We love your library, but currently it doesn't seem to be usable with Xcode 16.1. When importing the library, an error is observed that prevents compilation of the test target. I included a minimal sample project down below. This is pretty urgent since we are a week away from a new Xcode RC.

Describe the bug When importing SnapshotTesting in a project, the following error occurs:

Missing required module 'Testing'

To Reproduce swift-snapshot-testing.zip

import SnapshotTesting

final class SnapshotTestSampleUITests: XCTestCase {

Expected behavior The project should compile without errors when importing SnapshotTesting, and the SnapshotTesting library should function as expected without the Testing module error.

Screenshots

image

Environment

@stephencelis Am happy to help fork and fix this if I can get some more information on the Testing framework and the wizardry happening with the imports here. Thanks!

JRR-OSU commented 2 months ago

FWIW, I cannot get the sample to compile with Xcode 16.0 Beta 5 or Beta 6 either. Both of those are running in Swift 5 mode.

mbrandonw commented 2 months ago

Hi @JRR-OSU, the project you have provided compiles just fine in Xcode 16.1 beta for me, and I also created a fresh project, added SnapshotTesting, and that too compiles just fine.

Can you please provide a project that demonstrates the problem? And since it is not clear this is an issue with the library, I am going to convert this to a discussion. Please feel free to continue the conversation over there.