Originally created by @odenix on GitHub (Nov 3, 2024).
l = new Listing { "foo" }
l2 = (l) {
[0] = "bar"
}
l3 = new Listing<Int> {
...l2
}
The error message correctly complains about "bar" but shows the source location of "foo":
–– Pkl Error ––
Expected value of type `Int`, but got type `String`.
Value: "bar"
7 | l3 = new Listing<Int> {
^^^
at test#l3 (file:///D:/pkl/test.pkl, line 7)
1 | l = new Listing { "foo" }
^^^^^
at test#l[#1] (file:///D:/pkl/test.pkl, line 1)
This issue is caused by a fundamental flaw in how VmObject.iterateMemberValues() works. The same issue likely exists in other places.
I'm working towards a fix that offers better ways to iterate over VmObject. (It's how I discovered this problem.)
PS: The blue colored line numbers 7 | and 1 | are difficult to read on black background.
Originally created by @odenix on GitHub (Nov 3, 2024).
```
l = new Listing { "foo" }
l2 = (l) {
[0] = "bar"
}
l3 = new Listing<Int> {
...l2
}
```
The error message correctly complains about "bar" but shows the source location of "foo":
```
–– Pkl Error ––
Expected value of type `Int`, but got type `String`.
Value: "bar"
7 | l3 = new Listing<Int> {
^^^
at test#l3 (file:///D:/pkl/test.pkl, line 7)
1 | l = new Listing { "foo" }
^^^^^
at test#l[#1] (file:///D:/pkl/test.pkl, line 1)
```
This issue is caused by a fundamental flaw in how `VmObject.iterateMemberValues()` works. The same issue likely exists in other places.
I'm working towards a fix that offers better ways to iterate over `VmObject`. (It's how I discovered this problem.)
PS: The blue colored line numbers `7 |` and `1 |` are difficult to read on black background.
adam
added the bug label 2025-12-30 01:22:37 +01:00
PS: The blue colored line numbers 7 | and 1 | are difficult to read on black background.
Hm, it doesn't look too bad for me. But, hard to predict how every terminal renders this. Can you send a screenshot?
@bioball commented on GitHub (Nov 4, 2024):
> PS: The blue colored line numbers 7 | and 1 | are difficult to read on black background.
Hm, it doesn't look too bad for me. But, hard to predict how every terminal renders this. Can you send a screenshot?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @odenix on GitHub (Nov 3, 2024).
The error message correctly complains about "bar" but shows the source location of "foo":
This issue is caused by a fundamental flaw in how
VmObject.iterateMemberValues()works. The same issue likely exists in other places.I'm working towards a fix that offers better ways to iterate over
VmObject. (It's how I discovered this problem.)PS: The blue colored line numbers
7 |and1 |are difficult to read on black background.@bioball commented on GitHub (Nov 4, 2024):
Hm, it doesn't look too bad for me. But, hard to predict how every terminal renders this. Can you send a screenshot?
@odenix commented on GitHub (Nov 4, 2024):
I can barely read them.
@odenix commented on GitHub (Nov 11, 2024):
I have a PR ready. I'll send it once fewer PRs are in flight.