-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(eval): do not panic when encountering an array or object as objec…
…t key in `std.parseYaml`
- Loading branch information
Showing
10 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
std.parseYaml("{[]: 1}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: failed to parse YAML: line 0 column 1: object key is an array | ||
note: while evaluating call to `parseYaml` | ||
--> key0_is_array.jsonnet:1:1 | ||
| | ||
1 | std.parseYaml("{[]: 1}") | ||
| ------------------------ | ||
note: during top-level value evaluation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
std.parseYaml("{{}: 1}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: failed to parse YAML: line 0 column 1: object key is an object | ||
note: while evaluating call to `parseYaml` | ||
--> key0_is_object.jsonnet:1:1 | ||
| | ||
1 | std.parseYaml("{{}: 1}") | ||
| ------------------------ | ||
note: during top-level value evaluation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
std.parseYaml("{a: 1, []: 2}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: failed to parse YAML: line 0 column 7: object key is an array | ||
note: while evaluating call to `parseYaml` | ||
--> key1_is_array.jsonnet:1:1 | ||
| | ||
1 | std.parseYaml("{a: 1, []: 2}") | ||
| ------------------------------ | ||
note: during top-level value evaluation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
std.parseYaml("{a: 1, {}: 2}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: failed to parse YAML: line 0 column 7: object key is an object | ||
note: while evaluating call to `parseYaml` | ||
--> key1_is_object.jsonnet:1:1 | ||
| | ||
1 | std.parseYaml("{a: 1, {}: 2}") | ||
| ------------------------------ | ||
note: during top-level value evaluation | ||
|