Change how VmValueRenderer renders Typed values (#1412)

This changes it to render the qualified name instead of the simple name.

* Module classes render the module name
* Classes within module render the module name and the class name joined by `#`
* Rendering of members of `pkl:base` does not change

For example:

* `new k8s.core.v1.Service {}` instead of `new ModuleClass {}`.
* `new k8s.core.v1.Service#ServiceSpec {}` instead of `new ServiceSpec {}`
* `new pkl.Project {}` instead of `new ModuleClass {}`

This affects the following:

* `toString()`
* `trace()`
* Error messages
* REPL
This commit is contained in:
Daniel Chao authored and GitHub committed 2026-10-08 13:32:26 -07:00
1 parent 66fb5c133b
commit f973fd6717
38 files changed
+66 -66

No files matched your search

@@ -400,7 +400,7 @@ public final class VmValueRenderer {
VmClass clazz = value.getVmClass();
append("new ");
append(clazz.getSimpleName());
append(clazz.getDisplayName());
append(' ');
}
@@ -39,7 +39,7 @@ examples {
"new Listing { 1; 2; 3 }"
"new Mapping { [\"Pigeon\"] = 42; [\"Barn Owl\"] = 21 }"
"new Dynamic { name = \"Pigeon\"; age = 42 }"
"new Person2 { name = \"Pigeon\"; age = 42 }"
"new any#Person2 { name = \"Pigeon\"; age = 42 }"
"null"
"null"
}
@@ -11,7 +11,7 @@ res10 = "Cannot render value of type `Map` as Properties. Value: Map(\"name\", \
res11 = "Cannot render value of type `Listing` as Properties. Value: new Listing { \"pigeon\"; \"parrot\" }"
res12 = "Cannot render value of type `Mapping` as Properties. Value: new Mapping { [\"name\"] = ?; [\"age\"] = ? }"
res13 = "Cannot render value of type `Dynamic` as Properties. Value: new Dynamic { name = ?; age = ? }"
res14 = "Cannot render value of type `propertiesRenderer4#Person` as Properties. Value: new Person { name = ?; age = ? }"
res14 = "Cannot render value of type `propertiesRenderer4#Person` as Properties. Value: new propertiesRenderer4#Person { name = ?; age = ? }"
res15 = "Cannot render value of type `Pair` as Properties. Value: Pair(1, 2)"
res16 = "Cannot render value of type `Class` as Properties. Value: propertiesRenderer4#Person"
res17 = "Cannot render value of type `TypeAlias` as Properties. Value: propertiesRenderer4#Email"
@@ -50,7 +50,7 @@ j {
splitUnion = "${a.outputs.someListing}"
}
refInterpolation = "${a.outputs.someListing[1]}"
kInterpolation = "new K { aId = Reference(new D {}, String, new A { name = \"a\"; id = \"some-a-value\" }).id; bId = Reference(new D {}, String, new B { name = \"b\"; id = \"some-b-value\" }).id; aProperties = Reference(new D {}, reference#AProperties, new A { name = \"a\"; id = \"some-a-value\" }).outputs; bProperties = Reference(new D {}, reference#BProperties, new B { name = \"b\"; id = \"some-b-value\" }).outputs; nullProp = Reference(new D {}, Null, new A { name = \"a\"; id = \"some-a-value\" }).outputs.nullProp.prop1.prop2[\"foo\"].prop3; aValues { Reference(new D {}, Int, new A { name = \"a\"; id = \"some-a-value\" }).outputs.foo; Reference(new D {}, Int | Null, new A { name = \"a\"; id = \"some-a-value\" }).outputs.someMapping[\"key\"]; Reference(new D {}, Int, new A { name = \"a\"; id = \"some-a-value\" }).outputs.someMap[new MapKey { k = 123 }]; Reference(new D {}, Int, new A { name = \"a\"; id = \"some-a-value\" }).outputs.someListing[0]; Reference(new D {}, Int, new A { name = \"a\"; id = \"some-a-value\" }).outputs.someList[9223372036854775807]; Reference(new D {}, Int, new B { name = \"b\"; id = \"some-b-value\" }).outputs.nonString }; bValues { Reference(new D {}, String, new B { name = \"b\"; id = \"some-b-value\" }).outputs.foo; Reference(new D {}, Null | String, new B { name = \"b\"; id = \"some-b-value\" }).outputs.someMapping[\"key\"]; Reference(new D {}, String, new B { name = \"b\"; id = \"some-b-value\" }).outputs.someMap[new MapKey { k = 123 }]; Reference(new D {}, String, new B { name = \"b\"; id = \"some-b-value\" }).outputs.someListing[0]; Reference(new D {}, String, new B { name = \"b\"; id = \"some-b-value\" }).outputs.someList[9223372036854775807]; Reference(new D {}, String, new A { name = \"a\"; id = \"some-a-value\" }).outputs.nonInt }; splitUnion = null }"
kInterpolation = "new reference#K { aId = Reference(new reference#D {}, String, new reference#A { name = \"a\"; id = \"some-a-value\" }).id; bId = Reference(new reference#D {}, String, new reference#B { name = \"b\"; id = \"some-b-value\" }).id; aProperties = Reference(new reference#D {}, reference#AProperties, new reference#A { name = \"a\"; id = \"some-a-value\" }).outputs; bProperties = Reference(new reference#D {}, reference#BProperties, new reference#B { name = \"b\"; id = \"some-b-value\" }).outputs; nullProp = Reference(new reference#D {}, Null, new reference#A { name = \"a\"; id = \"some-a-value\" }).outputs.nullProp.prop1.prop2[\"foo\"].prop3; aValues { Reference(new reference#D {}, Int, new reference#A { name = \"a\"; id = \"some-a-value\" }).outputs.foo; Reference(new reference#D {}, Int | Null, new reference#A { name = \"a\"; id = \"some-a-value\" }).outputs.someMapping[\"key\"]; Reference(new reference#D {}, Int, new reference#A { name = \"a\"; id = \"some-a-value\" }).outputs.someMap[new reference#MapKey { k = 123 }]; Reference(new reference#D {}, Int, new reference#A { name = \"a\"; id = \"some-a-value\" }).outputs.someListing[0]; Reference(new reference#D {}, Int, new reference#A { name = \"a\"; id = \"some-a-value\" }).outputs.someList[9223372036854775807]; Reference(new reference#D {}, Int, new reference#B { name = \"b\"; id = \"some-b-value\" }).outputs.nonString }; bValues { Reference(new reference#D {}, String, new reference#B { name = \"b\"; id = \"some-b-value\" }).outputs.foo; Reference(new reference#D {}, Null | String, new reference#B { name = \"b\"; id = \"some-b-value\" }).outputs.someMapping[\"key\"]; Reference(new reference#D {}, String, new reference#B { name = \"b\"; id = \"some-b-value\" }).outputs.someMap[new reference#MapKey { k = 123 }]; Reference(new reference#D {}, String, new reference#B { name = \"b\"; id = \"some-b-value\" }).outputs.someListing[0]; Reference(new reference#D {}, String, new reference#B { name = \"b\"; id = \"some-b-value\" }).outputs.someList[9223372036854775807]; Reference(new reference#D {}, String, new reference#A { name = \"a\"; id = \"some-a-value\" }).outputs.nonInt }; splitUnion = null }"
aValuesJoined = """
${a.outputs.foo}
${a.outputs.someMapping[key]}
@@ -60,5 +60,5 @@ aValuesJoined = """
${b.outputs.nonString}
"""
typeArgs = "${null.prop}"
badThisRef = "Expected value of type `pkl.ref#Reference<reference#D, this>`, but got type `pkl.ref#Reference<reference#D, reference#A>`. Value: Reference(new D {}, reference#A, new BadResource { name = ? })"
bareFunctionType = "Expected value of type `pkl.ref#Reference<reference#D, String>`, but got type `pkl.ref#Reference<reference#D, Function4>`. Value: Reference(new D {}, Function4, null)"
badThisRef = "Expected value of type `pkl.ref#Reference<reference#D, this>`, but got type `pkl.ref#Reference<reference#D, reference#A>`. Value: Reference(new reference#D {}, reference#A, new reference#BadResource { name =..."
bareFunctionType = "Expected value of type `pkl.ref#Reference<reference#D, String>`, but got type `pkl.ref#Reference<reference#D, Function4>`. Value: Reference(new reference#D {}, Function4, null)"
@@ -115,10 +115,10 @@ examples {
["annAOverrideB"] {
name = "annAOverrideB"
annotations {
"new MyAnn {}"
"new reflect4#MyAnn {}"
}
allAnnotations {
"new MyAnn {}"
"new reflect4#MyAnn {}"
"new Unlisted {}"
}
modifiers {}
@@ -128,10 +128,10 @@ examples {
["annAOverrideC"] {
name = "annAOverrideC"
annotations {
"new MyAnn {}"
"new reflect4#MyAnn {}"
}
allAnnotations {
"new MyAnn {}"
"new reflect4#MyAnn {}"
"new Unlisted {}"
}
modifiers {}
@@ -145,7 +145,7 @@ examples {
}
allAnnotations {
"new AlsoKnownAs { names { \"mergedAnnotations\" } }"
"new MyAnn {}"
"new reflect4#MyAnn {}"
"new Unlisted {}"
}
modifiers {}
@@ -5,5 +5,5 @@
<age>42</age>
</pigeon2>
<res2>`xml.Element` is not supported here. Value: new Dynamic { _isXmlElement = true; name = &quot;pigeon2&quot;; attributes {}; isBlockF...</res2>
<res3>`xml.Inline` is not supported here. Value: new Inline { value { name = ?; age = ? } }</res3>
<res3>`xml.Inline` is not supported here. Value: new pkl.xml#Inline { value { name = ?; age = ? } }</res3>
</root>
@@ -21,6 +21,6 @@ examples {
}
["invalid top level value"] {
"The top-level value of a YAML stream must have type `Listing`, `List`, or `Set`, but got type `Int`. Value: 5"
"The top-level value of a YAML stream must have type `Listing`, `List`, or `Set`, but got type `yamlRendererStream2#Foo`. Value: new Foo {}"
"The top-level value of a YAML stream must have type `Listing`, `List`, or `Set`, but got type `yamlRendererStream2#Foo`. Value: new yamlRendererStream2#Foo {}"
}
}
@@ -35,8 +35,8 @@ examples {
"Expected value of type `Null`, but got type `List`. Value: List(1, 2, 3)"
"Expected value of type `Null`, but got type `Set`. Value: Set(1, 2, 3)"
"Expected value of type `Null`, but got type `Map`. Value: Map(1, \"one\", 2, \"two\", 3, \"three\")"
"Expected value of type `Null`, but got type `as#Base`. Value: new Base {}"
"Expected value of type `Null`, but got type `as#Derived`. Value: new Derived {}"
"Expected value of type `Null`, but got type `as#Base`. Value: new as#Base {}"
"Expected value of type `Null`, but got type `as#Derived`. Value: new as#Derived {}"
"Expected value of type `Null`, but got type `Mapping`. Value: new Mapping { [\"name\"] = \"Pigeon\"; [\"age\"] = 40 }"
"Expected value of type `Null`, but got type `Class`. Value: as#Base"
"Expected value of type `Null`, but got type `Listing`. Value: new Listing { null; null; \"Expected value of type `Null`, but got type `Strin..."
@@ -59,9 +59,9 @@ examples {
"Expected value of type `Int`, but got type `Map`. Value: Map(1, \"one\", 2, \"two\", 3, \"three\")"
"Expected value of type `Int`, but got `null`."
"Expected value of type `Int`, but got `null`."
"Expected value of type `Int`, but got type `as#Base`. Value: new Base {}"
"Expected value of type `Int`, but got type `as#Base`. Value: new as#Base {}"
"Expected value of type `Int`, but got type `Function1`. Value: new Function1 {}"
"Expected value of type `Int`, but got type `as#Derived`. Value: new Derived {}"
"Expected value of type `Int`, but got type `as#Derived`. Value: new as#Derived {}"
"Expected value of type `Int`, but got type `Mapping`. Value: new Mapping { [\"name\"] = \"Pigeon\"; [\"age\"] = 40 }"
"Expected value of type `Int`, but got type `Class`. Value: as#Base"
"Expected value of type `Int`, but got type `Listing`. Value: new Listing { 42; \"Expected value of type `Int`, but got type `String`. Value..."
@@ -83,8 +83,8 @@ examples {
"Expected value of type `as#Other`, but got type `Map`. Value: Map(1, \"one\", 2, \"two\", 3, \"three\")"
"Expected value of type `as#Other`, but got `null`."
"Expected value of type `as#Other`, but got `null`."
"Expected value of type `as#Other`, but got type `as#Base`. Value: new Base {}"
"Expected value of type `as#Other`, but got type `as#Derived`. Value: new Derived {}"
"Expected value of type `as#Other`, but got type `as#Base`. Value: new as#Base {}"
"Expected value of type `as#Other`, but got type `as#Derived`. Value: new as#Derived {}"
"Expected value of type `as#Other`, but got type `Mapping`. Value: new Mapping { [\"name\"] = \"Pigeon\"; [\"age\"] = 40 }"
"Expected value of type `as#Other`, but got type `Class`. Value: as#Base"
"Expected value of type `as#Other`, but got type `Listing`. Value: new Listing { \"Expected value of type `as#Other`, but got type `String`. Valu..."
@@ -124,7 +124,7 @@ examples {
}
["derived class"] {
new {}
"Expected value of type `as#Derived`, but got type `as#Base`. Value: new Base {}"
"Expected value of type `as#Derived`, but got type `as#Base`. Value: new as#Base {}"
}
["Mapping"] {
new {
@@ -30,7 +30,7 @@ examples {
"new Listing { 1; 2; 3 }"
"new Mapping { [\"Pigeon\"] = 42; [\"Barn Owl\"] = 21 }"
"new Dynamic { name = \"Pigeon\"; age = 42 }"
"new Person { name = \"Pigeon\"; age = 42 }"
"new string#Person { name = \"Pigeon\"; age = 42 }"
"My name is Pigeon and I'm 42 years old."
"null"
"null"
@@ -3,4 +3,4 @@ res1 {
street = "Hampton St."
}
}
res2 = "Type constraint `street.endsWith(\"St.\")` violated. Value: new Address { street = \"Garlic Blvd.\" }"
res2 = "Type constraint `street.endsWith(\"St.\")` violated. Value: new constraints3#Address { street = \"Garlic Blvd.\" }"
@@ -3,4 +3,4 @@ res1 {
z = 12
}
}
res2 = "Type constraint `multiply(subtract(add(5, 4), 3), 2) == z` violated. Value: new Y { z = 13 }"
res2 = "Type constraint `multiply(subtract(add(5, 4), 3), 2) == z` violated. Value: new constraints7#Y { z = 13 }"
@@ -6,7 +6,7 @@ xxx | renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (pkl:base)
This value was converted during rendering. Previous: new ModuleClass {}. After: "anyConverterError".
This value was converted during rendering. Previous: new anyConverterError {}. After: "anyConverterError".
xxx | if (renderer is BytesRenderer) renderer.renderDocument(value) else text.encodeToBytes("UTF-8")
^^^^
@@ -1,13 +1,13 @@
–– Pkl Error ––
Type constraint `firstOneIsSandy` violated.
Value: new Listing { new Bird { name = "Bob" }; new Bird { name = ? } }
Value: new Listing { new constraintDetails1#Bird { name = "Bob" }; new constraintDet...
(it: Listing<Bird>) -> it[0].name == "Sandy"
│ │ │ │
│ │ │ false
│ │ "Bob"
│ new Bird { name = "Bob" }
new Listing { new Bird { name = "Bob" }; new Bird { name = ? } }
│ new constraintDetails1#Bird { name = "Bob" }
new Listing { new constraintDetails1#Bird { name = "Bob" }; new constraintDetails1#Bird { name = ...
x | birds: Listing(firstOneIsSandy) = new {
^^^^^^^^^^^^^^^
@@ -1,18 +1,18 @@
–– Pkl Error ––
Type constraint `let (myself: Listing<Bird> = this)
myself[0].name == "Sandy"` violated.
Value: new Listing { new Bird { name = "Bob" }; new Bird { name = ? } }
Value: new Listing { new constraintDetails2#Bird { name = "Bob" }; new constraintDet...
let (myself: Listing<Bird> = this)
│
new Listing { new Bird { name = "Bob" }; new Bird { name = ? } }
new Listing { new constraintDetails2#Bird { name = "Bob" }; new constraintDetails2#Bird { name = ...
myself[0].name == "Sandy"
│ │ │ │
│ │ │ false
│ │ "Bob"
│ new Bird { name = "Bob" }
new Listing { new Bird { name = "Bob" }; new Bird { name = ? } }
│ new constraintDetails2#Bird { name = "Bob" }
new Listing { new constraintDetails2#Bird { name = "Bob" }; new constraintDetails2#Bird { name = ...
x | let (myself: Listing<Bird> = this)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1,11 +1,11 @@
–– Pkl Error ––
Type constraint `toList().every((it: Listing<Bird>) -> it[0].name == "Bob")` violated.
Value: new Listing { new Listing { new Bird { name = "Eagle" }; new Bird { name = ? ...
Value: new Listing { new Listing { new constraintDetails3#Bird { name = "Eagle" }; n...
toList().every((it: Listing<Bird>) -> it[0].name == "Bob")
│ │
│ false
List(new Listing { new Bird { name = "Eagle" }; new Bird { name = ? } })
List(new Listing { new constraintDetails3#Bird { name = "Eagle" }; new constraintDetails3#Bird { ...
x | foo: Listing(toList().every((it: Listing<Bird>) -> it[0].name == "Bob")) = new {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Cannot iterate over value of type `forGeneratorCannotIterateOverTyped#Person`.
Value: new Person {}
Value: new forGeneratorCannotIterateOverTyped#Person {}
x | for (_ in new Person {}) { 42 }
^^^^^^^^^^^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Expected value of type `listingTypeCheckError9#Bar`, but got type `listingTypeCheckError9#Foo`.
Value: new Foo {}
Value: new listingTypeCheckError9#Foo {}
x | local c = b as Listing<Bar>
^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Expected value of type `mappingTypeCheckError11#Bar`, but got type `mappingTypeCheckError11#Foo`.
Value: new Foo {}
Value: new mappingTypeCheckError11#Foo {}
x | local c = b as Mapping<Int, Bar>
^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Type constraint `name?.contains("Bob") ?? false` violated.
Value: new Bird { name = "Pigeon" }
Value: new typeConstraints16#Bird { name = "Pigeon" }
name?.contains("Bob") ?? false
│ │ │
@@ -5,7 +5,7 @@ Value: "Huzzah"
startsWith(bub.name)
│ │ │
false │ "Bub"
new Person { name = "Bub" }
new typeConstraints2#Person { name = "Bub" }
x | foo: String(startsWith(bub.name)) = "Huzzah"
^^^^^^^^^^^^^^^^^^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Expected value of type `pkl.ref#Reference<reference1#D, Int>`, but got type `pkl.ref#Reference<reference1#D, String>`.
Value: Reference(new D {}, String, "")
Value: Reference(new reference1#D {}, String, "")
x | typealias Ref<T> = ref.Reference<D, T>
^^^^^^^^^^^^^^^^^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Expected value of type `pkl.ref#Reference<reference19#D, Int | Boolean>`, but got type `pkl.ref#Reference<reference19#D, Boolean | Int | String>`.
Value: Reference(new D {}, Boolean | Int | String, "").foo
Value: Reference(new reference19#D {}, Boolean | Int | String, "").foo
xx | test = ref.Reference(d, A, "").foo as ref.Reference<D, Int | Boolean>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Expected value of type `pkl.ref#Reference<reference2#D, Boolean | Int>`, but got type `pkl.ref#Reference<reference2#D, String>`.
Value: Reference(new D {}, String, "")
Value: Reference(new reference2#D {}, String, "")
x | typealias Ref<T> = ref.Reference<D, T>
^^^^^^^^^^^^^^^^^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Operator `[]` is not defined for operand types `pkl.ref#Reference<reference25#D, Duration | Listing<String>>` and `Int`.
Left operand : Reference(new D {}, Duration | Listing<String>, null).$
Left operand : Reference(new reference25#D {}, Duration | Listing<String>, null).$
Right operand: 0
xx | res = myRef[0]
@@ -1,6 +1,6 @@
–– Pkl Error ––
Expected value of type `pkl.ref#Reference<reference3#D, Listing<String>>`, but got type `pkl.ref#Reference<reference3#D, String>`.
Value: Reference(new D {}, String, "")
Value: Reference(new reference3#D {}, String, "")
x | typealias Ref<T> = ref.Reference<D, T>
^^^^^^^^^^^^^^^^^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Expected value of type `pkl.ref#Reference<reference4#D, reference4#Alias1>`, but got type `pkl.ref#Reference<reference4#D, String>`.
Value: Reference(new D {}, String, "")
Value: Reference(new reference4#D {}, String, "")
x | typealias Ref<T> = ref.Reference<D, T>
^^^^^^^^^^^^^^^^^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Expected value of type `pkl.ref#Reference<reference5#D, String>`, but got type `pkl.ref#Reference<reference5#D2, String>`.
Value: Reference(new D2 {}, String, "")
Value: Reference(new reference5#D2 {}, String, "")
x | typealias Ref<T> = ref.Reference<D, T>
^^^^^^^^^^^^^^^^^^^
@@ -1,6 +1,6 @@
–– Pkl Error ––
Operator `[]` is not defined for operand types `pkl.ref#Reference<reference7#D, List>` and `String`.
Left operand : Reference(new D {}, List, List())
Left operand : Reference(new reference7#D {}, List, List())
Right operand: "hi"
x | test = ref.Reference(d, List, List())["hi"]
@@ -1,6 +1,6 @@
–– Pkl Error ––
Cannot iterate over value of type `spreadSyntaxCannotIterateOverTyped#Person`.
Value: new Person { name = ? }
Value: new spreadSyntaxCannotIterateOverTyped#Person { name = ? }
x | ...person
^^^^^^
@@ -5,7 +5,7 @@ xx | theNumber : Int
^^^^^^^^^
at undefinedProperty3#C.theNumber (file:///$snippetsDir/input/errors/undefinedProperty3.pkl)
The above error occurred when rendering path `a.b[new D { dProperty = "dProperty" }].`bar-baz`.theNumber` of module `file:///$snippetsDir/input/errors/undefinedProperty3.pkl`.
The above error occurred when rendering path `a.b[new undefinedProperty3#D { dProperty = "dProperty" }].`bar-baz`.theNumber` of module `file:///$snippetsDir/input/errors/undefinedProperty3.pkl`.
xxx | renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -22,5 +22,5 @@ example5 {
}
}
example6 {
result = "Expected value of type `amendLambdaParametersTyped#Baz`, but got type `amendLambdaParametersTyped#Foo`. Value: new Foo {}"
result = "Expected value of type `amendLambdaParametersTyped#Baz`, but got type `amendLambdaParametersTyped#Foo`. Value: new amendLambdaParametersTyped#Foo {}"
}
@@ -8,4 +8,4 @@ res7 = 22
res8 = 44
res9 = 44
res10 = "Operator `|>` is not defined for operand types `Int` and `Int`. Left operand : 42 Right operand: 21"
res11 = "Operator `|>` is not defined for operand types `Int` and `pipeOperator#Person`. Left operand : 42 Right operand: new Person {}"
res11 = "Operator `|>` is not defined for operand types `Int` and `pipeOperator#Person`. Left operand : 42 Right operand: new pipeOperator#Person {}"
@@ -1,12 +1,12 @@
res1 = "Cannot instantiate, or amend an instance of, external class `Int`."
res2 = "Cannot instantiate, or amend an instance of, external class `List`."
res3 = "Cannot instantiate, or amend an instance of, external class `List`."
res4 = "Object of type `new Person {}` cannot have an entry."
res4 = "Object of type `new wrongParent#Person {}` cannot have an entry."
res5 = "Cannot instantiate abstract class `ValueRenderer`."
res6 = "Element index `0` is out of range `0`..`-1`."
res7 = "Cannot instantiate, or amend an instance of, external class `Int`."
res8 = "Cannot instantiate, or amend an instance of, external class `List`."
res9 = "Cannot instantiate, or amend an instance of, external class `List`."
res10 = "Object of type `new Person {}` cannot have an entry."
res10 = "Object of type `new wrongParent#Person {}` cannot have an entry."
res11 = "Cannot instantiate abstract class `ValueRenderer`."
res12 = "Element index `0` is out of range `0`..`-1`."
@@ -1,6 +1,6 @@
–– Pkl Error ––
Type constraint `(externalModuleReaders != null).implies(isFileBasedProject)` violated.
Value: new ModuleClass { externalProperties = ?; env = ?; allowedModules = ?; allowe...
Value: new pkl.EvaluatorSettings { externalProperties = ?; env = ?; allowedModules =...
(externalModuleReaders != null).implies(isFileBasedProject)
│ │ │ │
@@ -1,6 +1,6 @@
–– Pkl Error ––
Expected value of type `*RemoteDependency | Project(isValidLoadDependency)`, but got a different `pkl.Project`.
Value: new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"] ...
Value: new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"] ...
xxx | dependencies: Mapping<String(!contains("/")), *RemoteDependency | Project(isValidLoadDependency)>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,26 +8,26 @@ at pkl.Project#dependencies (pkl:Project)
* Value is not of type `Project(isValidLoadDependency)` because:
Type constraint `isValidLoadDependency` violated.
Value: new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"...
Value: new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"...
(it: Project) ->
isUriLocal(projectFileUri, it.projectFileUri)
│ │ │ │
true │ │ "file:///$snippetsDir/projects/badProjectDeps4/PklProject"
│ new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett...
│ new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett...
"file:///$snippetsDir/projects/badProjectDeps4/PklProject"
&& it.projectFileUri.endsWith("/PklProject")
│ │ │ │
│ │ │ true
│ │ "file:///$snippetsDir/projects/badProjectDeps4/PklProject"
│ new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett...
│ new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett...
true
&& it != module
│ │ │
│ │ false
│ new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett...
│ new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett...
false
&& it.package != null
@@ -15,5 +15,5 @@ res3 {
modName = "currentModuleType6#ModuleSubclass"
mod2x = -1
}
res4 = "Expected value of type `currentModuleType6#ModuleSubclass`, but got type `moduleTypeProperty`. Value: new ModuleClass { x = ?; y = ?; modName = ? }"
res4 = "Expected value of type `currentModuleType6#ModuleSubclass`, but got type `moduleTypeProperty`. Value: new moduleTypeProperty { x = ?; y = ?; modName = ? }"
pkl: WARN: Cannot reference `module` type within a class body. This will be an error in a future release. (file:///$snippetsDir/input/types/currentModuleType6.pkl)
@@ -5,22 +5,22 @@ res1d = 2
res1e = 4
res4 = null
res7 = "Expected value of type `thisType1#Bad`, but got type `String`. Value: \"abc\""
res8 = "Expected value of type `thisType1#Bad`, but got type `thisType1#Person`. Value: new Person {}"
res9 = "Expected value of type `thisType1#Bad`, but got type `thisType1#Person`. Value: new Person {}"
res10 = "Expected value of type `thisType1#Bad`, but got type `thisType1#Person`. Value: new Person {}"
res8 = "Expected value of type `thisType1#Bad`, but got type `thisType1#Person`. Value: new thisType1#Person {}"
res9 = "Expected value of type `thisType1#Bad`, but got type `thisType1#Person`. Value: new thisType1#Person {}"
res10 = "Expected value of type `thisType1#Bad`, but got type `thisType1#Person`. Value: new thisType1#Person {}"
res11a = 2
res11b = 3
res11c = 4
res11d = 4
res12 = "Expected value of type `thisType1#Good`, but got type `thisType1`. Value: new ModuleClass { res1a = 1; res1b = 2; res1c = 3; res1d = 2; res1e = 4; res4..."
res12 = "Expected value of type `thisType1#Good`, but got type `thisType1`. Value: new thisType1 { res1a = 1; res1b = 2; res1c = 3; res1d = 2; res1e = 4; res4 =..."
res13a = 1
res14 = List(3)
res14a = "Expected value of type `thisType1#Good`, but got type `thisType1`. Value: new ModuleClass { res1a = 1; res1b = 2; res1c = 3; res1d = 2; res1e = 4; res4..."
res14a = "Expected value of type `thisType1#Good`, but got type `thisType1`. Value: new thisType1 { res1a = 1; res1b = 2; res1c = 3; res1d = 2; res1e = 4; res4 =..."
res14b = 5
res15 = List(new {
x = 3
})
res15a = "Expected value of type `thisType1#B`, but got type `thisType1#A`. Value: new A { x = 1 }"
res15a = "Expected value of type `thisType1#B`, but got type `thisType1#A`. Value: new thisType1#A { x = 1 }"
res15b = List(new {
x = 3
})
@@ -1,7 +1,7 @@
pkl: WARN: Cannot reference `module` type within a type alias body. This will be an error in a future release. (file:///$snippetsDir/input-helper/types/typeAliasModule.pkl)
–– Pkl Error ––
Expected value of type `typeAliasModule`, but got type `typeAlias6`.
Value: new ModuleClass { res = ? }
Value: new typeAlias6 { res = ? }
x | res: typeAliasModule = module
^^^^^^^^^^^^^^^