Skip to content

Commit af44750

Browse files
authored
Merge pull request #42 from cwakamo/eng/PR-45287607-use-underscored-PlaygroundQuickLook
Adopt the underscored variants of PlaygroundQuickLook, CustomPlaygrou…
2 parents 6eb061c + 4b2bdc8 commit af44750

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

PlaygroundLogger/PlaygroundLogger/LegacySupport/PlaygroundQuickLook+OpaqueRepresentationSupport.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Foundation
1818
import AppKit
1919
#endif
2020

21-
extension PlaygroundQuickLook {
21+
extension _PlaygroundQuickLook {
2222
func opaqueRepresentation() throws -> LogEntry.OpaqueRepresentation {
2323
// TODO: don't crash in this function; instead, throw an error so we can encode an error log message instead
2424

PlaygroundLogger/PlaygroundLogger/LogEntry+Reflection.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ extension LogEntry {
9393
}
9494

9595
// For types which conform to the legacy `CustomPlaygroundQuickLookable` or `_DefaultCustomPlaygroundQuickLookable` protocols, get their `PlaygroundQuickLook` and use that for logging.
96-
else if let customQuickLookable = instance as? CustomPlaygroundQuickLookable {
96+
else if let customQuickLookable = instance as? _CustomPlaygroundQuickLookable {
9797
self = try .init(playgroundQuickLook: customQuickLookable.customPlaygroundQuickLook, name: name, typeName: typeName, summary: generateSummary(for: instance, withTypeName: typeName, using: mirror))
9898
}
99-
else if let defaultQuickLookable = instance as? _DefaultCustomPlaygroundQuickLookable {
99+
else if let defaultQuickLookable = instance as? __DefaultCustomPlaygroundQuickLookable {
100100
self = try .init(playgroundQuickLook: defaultQuickLookable._defaultCustomPlaygroundQuickLook, name: name, typeName: typeName, summary: generateSummary(for: instance, withTypeName: typeName, using: mirror))
101101
}
102102

@@ -130,7 +130,7 @@ extension LogEntry {
130130
}
131131
}
132132

133-
private init(playgroundQuickLook: PlaygroundQuickLook, name: String, typeName: String, summary: String) throws {
133+
private init(playgroundQuickLook: _PlaygroundQuickLook, name: String, typeName: String, summary: String) throws {
134134
// TODO: figure out when to set `preferBriefSummary` to true
135135
self = try .opaque(name: name, typeName: typeName, summary: summary, preferBriefSummary: false, representation: playgroundQuickLook.opaqueRepresentation())
136136
}

PlaygroundLogger/PlaygroundLoggerTests/LegacyPlaygroundLoggerTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,12 +640,12 @@ class LegacyPlaygroundLoggerTests: XCTestCase {
640640
}
641641

642642
func testPlaygroundQuickLookCalledOnce() {
643-
class MyObject : CustomPlaygroundQuickLookable {
643+
class MyObject : _CustomPlaygroundQuickLookable {
644644
var numCalls = 0
645-
var customPlaygroundQuickLook: PlaygroundQuickLook {
645+
var customPlaygroundQuickLook: _PlaygroundQuickLook {
646646
get {
647647
numCalls = numCalls + 1
648-
return PlaygroundQuickLook(reflecting: "Hello world")
648+
return .text("Hello world")
649649
}
650650
}
651651
}

0 commit comments

Comments
 (0)