mirror of
https://github.com/apple/pkl.git
synced 2026-05-28 01:29:15 +02:00
Follow up for trace pretty printing (#1227)
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
amends "pkl:Project"
|
||||
|
||||
evaluatorSettings {
|
||||
traceMode = "default"
|
||||
traceMode = "compact"
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
amends "pkl:Project"
|
||||
|
||||
evaluatorSettings {
|
||||
traceMode = "hidden"
|
||||
}
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
amends ".../snippetTest.pkl"
|
||||
|
||||
examples {
|
||||
["traceMode = 'hidden' results in no trace output"] {
|
||||
trace(new {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings = new {
|
||||
kicked = true
|
||||
["fjordConfig"] = new {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Vendored
+45
-1
@@ -1,7 +1,51 @@
|
||||
amends ".../snippetTest.pkl"
|
||||
|
||||
examples {
|
||||
["traceMode = 'pretty' results in indented, multi-line output"] {
|
||||
["single-line lhs, single-line rhs"] {
|
||||
let (val = new Dynamic {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings = new {
|
||||
kicked = true
|
||||
["fjordConfig"] = new {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
trace(val["Parrot"].name)
|
||||
}
|
||||
["single-line lhs, multi-line rhs"] {
|
||||
let (val = new Dynamic {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings = new {
|
||||
kicked = true
|
||||
["fjordConfig"] = new {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
trace(val)
|
||||
}
|
||||
["multi-line lhs, single-line rhs"] {
|
||||
trace((new Dynamic {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings = new {
|
||||
kicked = true
|
||||
["fjordConfig"] = new {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
})["Parrot"].name)
|
||||
}
|
||||
["multi-line lhs, multi-line rhs"] {
|
||||
trace(new {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
|
||||
+1
-1
@@ -25,4 +25,4 @@ pkl: TRACE: new {
|
||||
}
|
||||
}
|
||||
}
|
||||
} = new Dynamic { ["Parrot"] { name = "Parrot"; age = 1234; bucketSettings { kicked = true; ["fjordConfig"] { isPining = true } } } } (file:///$snippetsDir/input/projects/defaultTraceMode/defaultTraceMode.pkl)
|
||||
} = new Dynamic { ["Parrot"] { name = "Parrot"; age = 1234; bucketSettings { kicked = true; ["fjordConfig"] { isPining = true } } } } (file:///$snippetsDir/input/projects/compactTraceMode/compactTraceMode.pkl)
|
||||
Vendored
-16
@@ -1,16 +0,0 @@
|
||||
examples {
|
||||
["traceMode = 'hidden' results in no trace output"] {
|
||||
new {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings {
|
||||
kicked = true
|
||||
["fjordConfig"] {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+75
-20
@@ -1,5 +1,25 @@
|
||||
examples {
|
||||
["traceMode = 'pretty' results in indented, multi-line output"] {
|
||||
["single-line lhs, single-line rhs"] {
|
||||
"Parrot"
|
||||
}
|
||||
["single-line lhs, multi-line rhs"] {
|
||||
new {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings {
|
||||
kicked = true
|
||||
["fjordConfig"] {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
["multi-line lhs, single-line rhs"] {
|
||||
"Parrot"
|
||||
}
|
||||
["multi-line lhs, multi-line rhs"] {
|
||||
new {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
@@ -14,26 +34,61 @@ examples {
|
||||
}
|
||||
}
|
||||
}
|
||||
pkl: TRACE: new {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings = new {
|
||||
kicked = true
|
||||
["fjordConfig"] = new {
|
||||
isPining = true
|
||||
}
|
||||
pkl: TRACE: val["Parrot"].name = "Parrot"
|
||||
(file:///$snippetsDir/input/projects/prettyTraceMode/prettyTraceMode.pkl)
|
||||
pkl: TRACE: val =
|
||||
new Dynamic {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings {
|
||||
kicked = true
|
||||
["fjordConfig"] {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
} = new Dynamic {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings {
|
||||
kicked = true
|
||||
["fjordConfig"] {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
} (file:///$snippetsDir/input/projects/prettyTraceMode/prettyTraceMode.pkl)
|
||||
(file:///$snippetsDir/input/projects/prettyTraceMode/prettyTraceMode.pkl)
|
||||
pkl: TRACE:
|
||||
(new Dynamic {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings = new {
|
||||
kicked = true
|
||||
["fjordConfig"] = new {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
})["Parrot"].name
|
||||
= "Parrot"
|
||||
(file:///$snippetsDir/input/projects/prettyTraceMode/prettyTraceMode.pkl)
|
||||
pkl: TRACE:
|
||||
new {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings = new {
|
||||
kicked = true
|
||||
["fjordConfig"] = new {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
=
|
||||
new Dynamic {
|
||||
["Parrot"] {
|
||||
name = "Parrot"
|
||||
age = 1234
|
||||
bucketSettings {
|
||||
kicked = true
|
||||
["fjordConfig"] {
|
||||
isPining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
(file:///$snippetsDir/input/projects/prettyTraceMode/prettyTraceMode.pkl)
|
||||
|
||||
Reference in New Issue
Block a user