Repository navigation
Commit 9389a6f
committed
fix(query): drop arbitrary_precision, pin why
Reverting the previous commit's `arbitrary_precision`. It did keep a
wide decimal's digits, but the feature is crate-wide: with it on,
`serde_json::Number` serializes as the private struct
`$serde_json::private::Number`, which serde_json's own serializer
intercepts and serde_yaml does not. Verified — an embedding provider
config renders as
dimensions:
$serde_json::private::Number: '1536'
instead of `dimensions: 1536`, for every `-o yaml` output in the
binary carrying a `Value` number. Commands with nothing to do with
rendering results break, which costs more than the rounding it buys.
So a decimal wider than an f64 is rounded here, and that is now a
pinned fact rather than a surprise:
`a_wide_decimal_is_rounded_a_known_limitation` asserts the rounded
value and records why the obvious fix is the wrong one. The honest fix
is to stop routing the json output path through `Value` at all, as the
service does — a change to the output layer, not to this function.
Adds `yaml_renders_a_json_number_as_a_number`, which fails if the
feature is ever re-enabled. Nothing in the suite covered yaml output,
so this breakage would otherwise have shipped twice.1 parent 1c7ee1f commit 9389a6f
2 files changed
Lines changed: 43 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
1028 | | - | |
| 1028 | + | |
| 1029 | + | |
1029 | 1030 | | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1035 | 1043 | | |
1036 | | - | |
| 1044 | + | |
1037 | 1045 | | |
1038 | 1046 | | |
1039 | 1047 | | |
1040 | 1048 | | |
1041 | 1049 | | |
1042 | 1050 | | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1047 | 1071 | | |
1048 | 1072 | | |
1049 | 1073 | | |
| |||
0 commit comments