Replies: 5 comments 8 replies
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
I can confirm the same issue happens in my project, within UI Tests target. This target has a dependency on a Swift Package (technical- with general test tools), that has a dependency on swift-package-testing. To me it looks like @JRR-OSU also had this setup- swift-snapshot-testing being imported within UI tests target. |
Beta Was this translation helpful? Give feedback.
-
@mbrandonw With respect, it was significantly unhelpful to move this out of the issue tracker without any follow up questions or details being requested. Since I provided direct proof of the compile error from import of the lib including a screenshot and a basic sample project that does indeed demonstrate the problem, I would ask if you can provide relevant information as I did about what version of macOS you tested this on. From the looks of it, you either did not clear DerivedData or simply did not attempt to compile and run the test target (which is where the problem occurs.) The actual iOS target itself will still compile. I have tested on two separate machines and the issue occurs. Since @kondratk has kindly confirmed this is an issue that prevents previously working tests targets from compiling, I request moving this discussion back to the issue tracker so we can work on a PR. Thanks. |
Beta Was this translation helpful? Give feedback.
-
The included project does demonstrate the problem, but I can see from your screenshot that you have it set to a Mac target. Here's a better sample below that restricts the test target to iOS only. Apologies if that was the reason for the mixup here. I thought this was clear from my screenshot. In the above sample please make sure you click the following file with the same sim and run that UI test class.
This is true generally but this issue has been around for the last few betas. It's possible it goes away when the RC drops but that's unlikely. Since I discovered it works as a Mac target, I'm worried it may not work any longer for iOS targets, but my hope is that this issue might be caused by 81bbb32. I am more than willing to work on a PR regardless of if this is filed as an issue or not, I am just making the point that it makes way more sense to track it as one, since there's a proven error that prevents any existing iOS project's test target from working when that org updates Xcode and imports this lib. It also helps for SEO and when others look for the solution, etc. |
Beta Was this translation helpful? Give feedback.
-
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 UI 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
Expected behavior
The project should compile without errors when importing SnapshotTesting in test targets, and the SnapshotTesting library should function as expected without the Testing module error.
Screenshots
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!
Beta Was this translation helpful? Give feedback.
All reactions