-
Notifications
You must be signed in to change notification settings - Fork 642
Closed
Description
We have successfully been using the framework for snapshot testing for a long time.
This morning all our Xcode Cloud build has started failing with the error:
Cannot use conformance of 'Never' to 'TestScoping' here; 'Testing' has been imported as implementation-only
SnapshotsTestTrait.swift:37
This appears to be a problem with the implemenation-only import in that file.
#if canImport(Testing)
// NB: We are importing only the implementation of Testing because that framework is not available
// in Xcode UI test targets.
@_implementationOnly import Testing
@_spi(Experimental)
extension Trait where Self == _SnapshotsTestTrait {
/// Configure snapshot testing in a suite or test.
///
/// - Parameters:
/// - record: The record mode of the test.
/// - diffTool: The diff tool to use in failure messages.
public static func snapshots(
record: SnapshotTestingConfiguration.Record? = nil,
diffTool: SnapshotTestingConfiguration.DiffTool? = nil
) -> Self {
_SnapshotsTestTrait(
configuration: SnapshotTestingConfiguration(
record: record,
diffTool: diffTool
)
)
}
/// Configure snapshot testing in a suite or test.
///
/// - Parameter configuration: The configuration to use.
public static func snapshots(
_ configuration: SnapshotTestingConfiguration
) -> Self {
_SnapshotsTestTrait(configuration: configuration)
}
}
/// A type representing the configuration of snapshot testing.
@_spi(Experimental)
public struct _SnapshotsTestTrait: SuiteTrait, TestTrait {
public let isRecursive = true
let configuration: SnapshotTestingConfiguration
// public func execute(
// _ function: @escaping () async throws -> Void,
// for test: Test,
// testCase: Test.Case?
// ) async throws {
// try await withSnapshotTesting(
// record: configuration.record,
// diffTool: configuration.diffTool
// ) {
// try await function()
// }
// }
}
#endif
Tests has run perfectly up to now and they work locally. So it appears to be a change in Xcode Cloud.
Here's the command Xcode Cloud uses to tune tests:
Run command: 'xcodebuild build-for-testing -scheme 'AM Operator' -project '/Volumes/workspace/repository/OperatorApp/AM-Operator-App/AM Operator.xcodeproj' -destination 'platform=iOS Simulator,id=40FDE0C9-320B-4030-AB16-39F7EB933F43' -testProductsPath /Volumes/workspace/TestProducts.xctestproducts -derivedDataPath /Volumes/workspace/DerivedData -resultBundleVersion 3 -resultBundlePath /Volumes/workspace/resultbundle.xcresult -resultStreamPath /Volumes/workspace/tmp/resultBundleStream45efeb29-8273-490a-be53-e173056c70e6.json -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES COMPILER_INDEX_STORE_ENABLE=NO -hideShellScriptEnvironment'
Error: Command exited with non-zero exit-code: 65
I can see 66 unmerged pull requests and 116 reported issues. Is this library dead?
Metadata
Metadata
Assignees
Labels
No labels