Skip to content

DNM: Revert "Attachments! (#770)" #793

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

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions Sources/Testing/ABI/EntryPoints/EntryPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,6 @@ public struct __CommandLineArguments_v0: Sendable {

/// The value of the `--repeat-until` argument.
public var repeatUntil: String?

/// The value of the `--experimental-attachments-path` argument.
public var experimentalAttachmentsPath: String?
}

extension __CommandLineArguments_v0: Codable {
Expand All @@ -298,7 +295,6 @@ extension __CommandLineArguments_v0: Codable {
case skip
case repetitions
case repeatUntil
case experimentalAttachmentsPath
}
}

Expand Down Expand Up @@ -359,11 +355,6 @@ func parseCommandLineArguments(from args: [String]) throws -> __CommandLineArgum
if let xunitOutputIndex = args.firstIndex(of: "--xunit-output"), !isLastArgument(at: xunitOutputIndex) {
result.xunitOutput = args[args.index(after: xunitOutputIndex)]
}

// Attachment output
if let attachmentsPathIndex = args.firstIndex(of: "--experimental-attachments-path"), !isLastArgument(at: attachmentsPathIndex) {
result.experimentalAttachmentsPath = args[args.index(after: attachmentsPathIndex)]
}
#endif

if args.contains("--list-tests") {
Expand Down Expand Up @@ -473,14 +464,6 @@ public func configurationForEntryPoint(from args: __CommandLineArguments_v0) thr
}
}

// Attachment output.
if let attachmentsPath = args.experimentalAttachmentsPath {
guard fileExists(atPath: attachmentsPath) else {
throw _EntryPointError.invalidArgument("--experimental-attachments-path", value: attachmentsPath)
}
configuration.attachmentsPath = attachmentsPath
}

#if canImport(Foundation)
// Event stream output (experimental)
if let eventStreamOutputPath = args.eventStreamOutputPath {
Expand Down
32 changes: 0 additions & 32 deletions Sources/Testing/ABI/v0/Encoded/ABIv0.EncodedAttachment.swift

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/Testing/ABI/v0/Encoded/ABIv0.EncodedEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ extension ABIv0 {
case testStarted
case testCaseStarted
case issueRecorded
case valueAttached = "_valueAttached"
case testCaseEnded
case testEnded
case testSkipped
Expand All @@ -46,14 +45,6 @@ extension ABIv0 {
/// ``kind-swift.property`` property is ``Kind-swift.enum/issueRecorded``.
var issue: EncodedIssue?

/// The value that was attached, if any.
///
/// The value of this property is `nil` unless the value of the
/// ``kind-swift.property`` property is ``Kind-swift.enum/valueAttached``.
///
/// - Warning: Attachments are not yet part of the JSON schema.
var _attachment: EncodedAttachment?

/// Human-readable messages associated with this event that can be presented
/// to the user.
var messages: [EncodedMessage]
Expand All @@ -80,9 +71,6 @@ extension ABIv0 {
case let .issueRecorded(recordedIssue):
kind = .issueRecorded
issue = EncodedIssue(encoding: recordedIssue, in: eventContext)
case let .valueAttached(attachment):
kind = .valueAttached
_attachment = EncodedAttachment(encoding: attachment, in: eventContext)
case .testCaseEnded:
if eventContext.test?.isParameterized == false {
return nil
Expand Down
3 changes: 0 additions & 3 deletions Sources/Testing/ABI/v0/Encoded/ABIv0.EncodedMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ extension ABIv0 {
case difference
case warning
case details
case attachment = "_attachment"

init(encoding symbol: Event.Symbol) {
self = switch symbol {
Expand All @@ -52,8 +51,6 @@ extension ABIv0 {
.warning
case .details:
.details
case .attachment:
.attachment
}
}
}
Expand Down
171 changes: 0 additions & 171 deletions Sources/Testing/Attachments/Test.Attachable.swift

This file was deleted.

Loading