Skip to content

Commit 74c8d09

Browse files
feat: update cpp-jsonnet and stdlib to latest (unreleased)
This includes the stdlib additions in google/jsonnet#1187 Also updates golden files for go-jsonnet tests; the changes to the goldens are mostly changes to error locations from the standard library.
1 parent b3fed3b commit 74c8d09

14 files changed

+41118
-30217
lines changed

astgen/stdast.go

+41,075-30,172
Large diffs are not rendered by default.

bazel/repositories.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ load(
44
)
55

66
# NB: update_cpp_jsonnet.sh looks for these.
7-
CPP_JSONNET_SHA256 = "ac01553989006ba61a09dad5b016facaaa58186260eb28f79936e942cb1d1692"
8-
CPP_JSONNET_GITHASH = "f45e01d632b29e4c0757ec7ba188ce759298e6d3"
7+
CPP_JSONNET_SHA256 = "9e545f17b614c89d40d1f58d7f8fceded4cc93d1d29edfd8a93833b61201fd20"
8+
CPP_JSONNET_GITHASH = "4487bfb8ba7ed7a3d91d79d4a1aa2205e7839558"
99

1010
def jsonnet_go_repositories():
1111
http_archive(

cpp-jsonnet

Submodule cpp-jsonnet updated 367 files

testdata/assert_equal4.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
RUNTIME ERROR: Assertion failed. {"x": 1} != {"x": 2}
22
-------------------------------------------------
3-
<std>:826:7-50 function <anonymous>
3+
<std>:850:7-56 function <anonymous>
44

5-
error 'Assertion failed. ' + a + ' != ' + b,
5+
error 'Assertion failed. ' + astr + ' != ' + bstr,
66

77
-------------------------------------------------
88
testdata/assert_equal4:1:1-32 $

testdata/assert_equal5.golden

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
RUNTIME ERROR: Assertion failed.
2-
!=
3-
1+
RUNTIME ERROR: Assertion failed. "\n " != "\n"
42
-------------------------------------------------
5-
<std>:826:7-50 function <anonymous>
3+
<std>:850:7-56 function <anonymous>
64

7-
error 'Assertion failed. ' + a + ' != ' + b,
5+
error 'Assertion failed. ' + astr + ' != ' + bstr,
86

97
-------------------------------------------------
108
testdata/assert_equal5:1:1-29 $

testdata/assert_equal6.golden

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
RUNTIME ERROR: Assertion failed.  !=
1+
RUNTIME ERROR: Assertion failed. "\u001b[31m" != ""
22
-------------------------------------------------
3-
<std>:826:7-50 function <anonymous>
3+
<std>:850:7-56 function <anonymous>
44

5-
error 'Assertion failed. ' + a + ' != ' + b,
5+
error 'Assertion failed. ' + astr + ' != ' + bstr,
66

77
-------------------------------------------------
88
testdata/assert_equal6:1:1-34 $

testdata/percent_bad.golden

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RUNTIME ERROR: Operator % cannot be used on types number and string.
22
-------------------------------------------------
3-
<std>:251:7-94 function <anonymous>
3+
<std>:262:7-94 function <anonymous>
44

55
error 'Operator % cannot be used on types ' + std.type(a) + ' and ' + std.type(b) + '.',
66

testdata/percent_bad2.golden

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
RUNTIME ERROR: Too many values to format: 1, expected 0
22
-------------------------------------------------
3-
<std>:696:11-86 function <format_codes_arr>
3+
<std>:716:11-86 function <format_codes_arr>
44

55
error ('Too many values to format: ' + std.length(arr) + ', expected ' + j)
66

77
-------------------------------------------------
8-
<std>:702:11-59 function <format_codes_arr>
8+
<std>:722:11-59 function <format_codes_arr>
99

1010
format_codes_arr(codes, arr, i + 1, j, v + code) tailstrict
1111

1212
-------------------------------------------------
13-
<std>:793:7-48 function <anonymous>
13+
<std>:813:7-48 function <anonymous>
1414

1515
format_codes_arr(codes, [vals], 0, 0, ''),
1616

1717
-------------------------------------------------
18-
<std>:249:7-23 function <anonymous>
18+
<std>:260:7-23 function <anonymous>
1919

2020
std.format(a, b)
2121

testdata/percent_bad3.golden

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RUNTIME ERROR: Operator % cannot be used on types function and number.
22
-------------------------------------------------
3-
<std>:251:7-94 function <anonymous>
3+
<std>:262:7-94 function <anonymous>
44

55
error 'Operator % cannot be used on types ' + std.type(a) + ' and ' + std.type(b) + '.',
66

testdata/percent_format_str4.golden

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
RUNTIME ERROR: Too many values to format: 2, expected 1
22
-------------------------------------------------
3-
<std>:696:11-86 function <format_codes_arr>
3+
<std>:716:11-86 function <format_codes_arr>
44

55
error ('Too many values to format: ' + std.length(arr) + ', expected ' + j)
66

77
-------------------------------------------------
8-
<std>:702:11-59 function <format_codes_arr>
8+
<std>:722:11-59 function <format_codes_arr>
99

1010
format_codes_arr(codes, arr, i + 1, j, v + code) tailstrict
1111

1212
-------------------------------------------------
13-
<std>:789:7-46 function <anonymous>
13+
<std>:809:7-46 function <anonymous>
1414

1515
format_codes_arr(codes, vals, 0, 0, '')
1616

1717
-------------------------------------------------
18-
<std>:249:7-23 function <anonymous>
18+
<std>:260:7-23 function <anonymous>
1919

2020
std.format(a, b)
2121

testdata/percent_format_str5.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
RUNTIME ERROR: Not enough values to format: 1, expected more than 1
22
-------------------------------------------------
3-
<std>:729:15-103 thunk <val> from <function <format_codes_arr>>
3+
<std>:749:15-103 thunk <val> from <function <format_codes_arr>>
44

55
error ('Not enough values to format: ' + std.length(arr) + ', expected more than ' + j2);
66

77
-------------------------------------------------
8-
<std>:734:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
8+
<std>:754:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
99

1010
format_code(val, code, tmp.fw, tmp2.prec, j2);
1111

1212
-------------------------------------------------
13-
<std>:604:22-25 thunk from <function <format_code>>
13+
<std>:624:22-25 thunk from <function <format_code>>
1414

1515
std.toString(val)
1616

1717
-------------------------------------------------
18-
<std>:604:9-26 function <format_code>
18+
<std>:624:9-26 function <format_code>
1919

2020
std.toString(val)
2121

2222
-------------------------------------------------
2323
... (skipped 10 frames)
2424
-------------------------------------------------
25-
<std>:745:11-64 function <format_codes_arr>
25+
<std>:765:11-64 function <format_codes_arr>
2626

2727
format_codes_arr(codes, arr, i + 1, j3, v + s_padded) tailstrict;
2828

2929
-------------------------------------------------
30-
<std>:789:7-46 function <anonymous>
30+
<std>:809:7-46 function <anonymous>
3131

3232
format_codes_arr(codes, vals, 0, 0, '')
3333

3434
-------------------------------------------------
35-
<std>:249:7-23 function <anonymous>
35+
<std>:260:7-23 function <anonymous>
3636

3737
std.format(a, b)
3838

testdata/percent_format_str6.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
RUNTIME ERROR: Not enough values to format: 1, expected more than 1
22
-------------------------------------------------
3-
<std>:729:15-103 thunk <val> from <function <format_codes_arr>>
3+
<std>:749:15-103 thunk <val> from <function <format_codes_arr>>
44

55
error ('Not enough values to format: ' + std.length(arr) + ', expected more than ' + j2);
66

77
-------------------------------------------------
8-
<std>:734:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
8+
<std>:754:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
99

1010
format_code(val, code, tmp.fw, tmp2.prec, j2);
1111

1212
-------------------------------------------------
13-
<std>:604:22-25 thunk from <function <format_code>>
13+
<std>:624:22-25 thunk from <function <format_code>>
1414

1515
std.toString(val)
1616

1717
-------------------------------------------------
18-
<std>:604:9-26 function <format_code>
18+
<std>:624:9-26 function <format_code>
1919

2020
std.toString(val)
2121

2222
-------------------------------------------------
2323
... (skipped 10 frames)
2424
-------------------------------------------------
25-
<std>:745:11-64 function <format_codes_arr>
25+
<std>:765:11-64 function <format_codes_arr>
2626

2727
format_codes_arr(codes, arr, i + 1, j3, v + s_padded) tailstrict;
2828

2929
-------------------------------------------------
30-
<std>:793:7-48 function <anonymous>
30+
<std>:813:7-48 function <anonymous>
3131

3232
format_codes_arr(codes, [vals], 0, 0, ''),
3333

3434
-------------------------------------------------
35-
<std>:249:7-23 function <anonymous>
35+
<std>:260:7-23 function <anonymous>
3636

3737
std.format(a, b)
3838

testdata/percent_format_str7.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
RUNTIME ERROR: Format required number at 0, got string
22
-------------------------------------------------
3-
<std>:(607:11)-(608:47) function <format_code>
3+
<std>:(627:11)-(628:47) function <format_code>
44

55
error 'Format required number at '
66
+ i + ', got ' + std.type(val)
77

88
-------------------------------------------------
9-
<std>:734:15-60 thunk <s> from <function <format_codes_arr>>
9+
<std>:754:15-60 thunk <s> from <function <format_codes_arr>>
1010

1111
format_code(val, code, tmp.fw, tmp2.prec, j2);
1212

1313
-------------------------------------------------
14-
<std>:739:24-25 thunk from <thunk <s_padded> from <function <format_codes_arr>>>
14+
<std>:759:24-25 thunk from <thunk <s_padded> from <function <format_codes_arr>>>
1515

1616
pad_left(s, tmp.fw, ' ');
1717

1818
-------------------------------------------------
19-
<std>:492:30-33 thunk from <thunk from <function <pad_left>>>
19+
<std>:512:30-33 thunk from <thunk from <function <pad_left>>>
2020

2121
padding(w - std.length(str), s) + str;
2222

2323
-------------------------------------------------
2424
... (skipped 7 frames)
2525
-------------------------------------------------
26-
<std>:745:11-64 function <format_codes_arr>
26+
<std>:765:11-64 function <format_codes_arr>
2727

2828
format_codes_arr(codes, arr, i + 1, j3, v + s_padded) tailstrict;
2929

3030
-------------------------------------------------
31-
<std>:789:7-46 function <anonymous>
31+
<std>:809:7-46 function <anonymous>
3232

3333
format_codes_arr(codes, vals, 0, 0, '')
3434

3535
-------------------------------------------------
36-
<std>:249:7-23 function <anonymous>
36+
<std>:260:7-23 function <anonymous>
3737

3838
std.format(a, b)
3939

testdata/percent_mod_int5.golden

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RUNTIME ERROR: Division by zero.
22
-------------------------------------------------
3-
<std>:247:7-23 function <anonymous>
3+
<std>:258:7-23 function <anonymous>
44

55
std.modulo(a, b)
66

0 commit comments

Comments
 (0)