Skip to content

Commit 2274717

Browse files
committed
Revert "Attachments! (swiftlang#770)"
This reverts commit bb19b2a.
1 parent bb19b2a commit 2274717

19 files changed

+30
-1040
lines changed

Sources/Testing/ABI/EntryPoints/EntryPoint.swift

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,6 @@ public struct __CommandLineArguments_v0: Sendable {
275275

276276
/// The value of the `--repeat-until` argument.
277277
public var repeatUntil: String?
278-
279-
/// The value of the `--experimental-attachments-path` argument.
280-
public var experimentalAttachmentsPath: String?
281278
}
282279

283280
extension __CommandLineArguments_v0: Codable {
@@ -298,7 +295,6 @@ extension __CommandLineArguments_v0: Codable {
298295
case skip
299296
case repetitions
300297
case repeatUntil
301-
case experimentalAttachmentsPath
302298
}
303299
}
304300

@@ -359,11 +355,6 @@ func parseCommandLineArguments(from args: [String]) throws -> __CommandLineArgum
359355
if let xunitOutputIndex = args.firstIndex(of: "--xunit-output"), !isLastArgument(at: xunitOutputIndex) {
360356
result.xunitOutput = args[args.index(after: xunitOutputIndex)]
361357
}
362-
363-
// Attachment output
364-
if let attachmentsPathIndex = args.firstIndex(of: "--experimental-attachments-path"), !isLastArgument(at: attachmentsPathIndex) {
365-
result.experimentalAttachmentsPath = args[args.index(after: attachmentsPathIndex)]
366-
}
367358
#endif
368359

369360
if args.contains("--list-tests") {
@@ -473,14 +464,6 @@ public func configurationForEntryPoint(from args: __CommandLineArguments_v0) thr
473464
}
474465
}
475466

476-
// Attachment output.
477-
if let attachmentsPath = args.experimentalAttachmentsPath {
478-
guard fileExists(atPath: attachmentsPath) else {
479-
throw _EntryPointError.invalidArgument("--experimental-attachments-path", value: attachmentsPath)
480-
}
481-
configuration.attachmentsPath = attachmentsPath
482-
}
483-
484467
#if canImport(Foundation)
485468
// Event stream output (experimental)
486469
if let eventStreamOutputPath = args.eventStreamOutputPath {

Sources/Testing/ABI/v0/Encoded/ABIv0.EncodedAttachment.swift

Lines changed: 0 additions & 32 deletions
This file was deleted.

Sources/Testing/ABI/v0/Encoded/ABIv0.EncodedEvent.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ extension ABIv0 {
2727
case testStarted
2828
case testCaseStarted
2929
case issueRecorded
30-
case valueAttached = "_valueAttached"
3130
case testCaseEnded
3231
case testEnded
3332
case testSkipped
@@ -46,14 +45,6 @@ extension ABIv0 {
4645
/// ``kind-swift.property`` property is ``Kind-swift.enum/issueRecorded``.
4746
var issue: EncodedIssue?
4847

49-
/// The value that was attached, if any.
50-
///
51-
/// The value of this property is `nil` unless the value of the
52-
/// ``kind-swift.property`` property is ``Kind-swift.enum/valueAttached``.
53-
///
54-
/// - Warning: Attachments are not yet part of the JSON schema.
55-
var _attachment: EncodedAttachment?
56-
5748
/// Human-readable messages associated with this event that can be presented
5849
/// to the user.
5950
var messages: [EncodedMessage]
@@ -80,9 +71,6 @@ extension ABIv0 {
8071
case let .issueRecorded(recordedIssue):
8172
kind = .issueRecorded
8273
issue = EncodedIssue(encoding: recordedIssue, in: eventContext)
83-
case let .valueAttached(attachment):
84-
kind = .valueAttached
85-
_attachment = EncodedAttachment(encoding: attachment, in: eventContext)
8674
case .testCaseEnded:
8775
if eventContext.test?.isParameterized == false {
8876
return nil

Sources/Testing/ABI/v0/Encoded/ABIv0.EncodedMessage.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ extension ABIv0 {
3030
case difference
3131
case warning
3232
case details
33-
case attachment = "_attachment"
3433

3534
init(encoding symbol: Event.Symbol) {
3635
self = switch symbol {
@@ -52,8 +51,6 @@ extension ABIv0 {
5251
.warning
5352
case .details:
5453
.details
55-
case .attachment:
56-
.attachment
5754
}
5855
}
5956
}

Sources/Testing/Attachments/Test.Attachable.swift

Lines changed: 0 additions & 171 deletions
This file was deleted.

0 commit comments

Comments
 (0)