undo logging changes
This commit is contained in:
parent
6583249ab7
commit
0590a9e768
|
@ -34,14 +34,13 @@ extension FiberReconciler.Fiber: CustomDebugStringConvertible {
|
|||
proposal: .unspecified
|
||||
)
|
||||
return """
|
||||
\(spaces)\(debugDescription)\(element != nil ? "(\(element!))" : "")
|
||||
\(child?.flush(level: level + 2) ?? "")\
|
||||
\(spaces)\(String(describing: typeInfo?.type ?? Any.self)
|
||||
.split(separator: "<")[0])\(element != nil ? "(\(element!))" : "") {\(element != nil ?
|
||||
"\n\(spaces)geometry: \(geometry)" :
|
||||
"")
|
||||
\(child?.flush(level: level + 2) ?? "")
|
||||
\(spaces)}
|
||||
\(sibling?.flush(level: level) ?? "")
|
||||
"""
|
||||
}
|
||||
|
||||
public var recursiveDescription: String {
|
||||
flush()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -270,13 +270,6 @@ public final class FiberReconciler<Renderer: FiberRenderer> {
|
|||
self.alternate = current
|
||||
current = alternate
|
||||
|
||||
print("""
|
||||
reconcile done
|
||||
mutations were:
|
||||
\(visitor.mutations.map { " \($0)" }.joined(separator: "\n"))
|
||||
alternate is \(self.alternate.recursiveDescription)
|
||||
current is \(current.recursiveDescription)
|
||||
""")
|
||||
// copy over elements to the alternate, so when an element is
|
||||
// replaced, the old element can still be accessed to emit
|
||||
// removal mutations for its children
|
||||
|
|
|
@ -57,13 +57,6 @@ public final class DOMElement: FiberElement {
|
|||
}
|
||||
}
|
||||
|
||||
extension DOMElement: CustomStringConvertible {
|
||||
public var description: String {
|
||||
"DOMElement(tag: \(content.tag), attributes: \(content.attributes.filter { $0.key != "style" }), innerHTML: \(content.innerHTML ?? "nil"))"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public extension DOMElement.Content {
|
||||
init<V>(from primitiveView: V, useDynamicLayout: Bool) where V: View {
|
||||
guard let primitiveView = primitiveView as? HTMLConvertible else { fatalError() }
|
||||
|
|
|
@ -106,23 +106,11 @@ public final class TestFiberElement: FiberElement, CustomStringConvertible {
|
|||
}
|
||||
|
||||
public var description: String {
|
||||
let memoryAddress = String(format: "%010p", unsafeBitCast(self, to: Int.self))
|
||||
return content.renderedValue + " (\(memoryAddress)) [\(children.count)]"
|
||||
}
|
||||
|
||||
public var recursiveDescription: String {
|
||||
var d = description
|
||||
if !children.isEmpty {
|
||||
d.append("\n")
|
||||
d.append(
|
||||
children
|
||||
.flatMap { $0.recursiveDescription.components(separatedBy:"\n").map { " \($0)"} }
|
||||
.joined(separator: "\n")
|
||||
)
|
||||
d.append("\n")
|
||||
}
|
||||
d.append(content.closingTag)
|
||||
return d
|
||||
"""
|
||||
\(content.renderedValue)
|
||||
\(children.map { " \($0.description)" }.joined(separator: "\n"))
|
||||
\(content.closingTag)
|
||||
"""
|
||||
}
|
||||
|
||||
public init(renderedValue: String, closingTag: String) {
|
||||
|
|
Loading…
Reference in New Issue