Commit b77334f
authored
Move validation of schema change codec up to tree change codec (#26817)
## Description
Move validation of schema change codec up to tree change codec.
This is incremental progress toward a state where we consistently use
codec versions only in places where we include the version in the actual
encoded data and dispatch based on that.
For places where we do not do explicit versioning of data, we want to
use alternatively clearly distinct schemes modularizing the code for
handling different data and different versions of the encodings for that
data. This case can be strongly typed and use normal direct code
dependencies to pull in the relevant logic.
As part of this, moving all the schema validation logic further up the
stack toward where the version dispatching happens (which is what this
PR is doing) helps is get toward a point where we can snapshot the
schema for each version of our codecs, and use that to help validate the
format not changed. This approach also reduces the need to do schema
validation to fewer places, eventually to only within
ClientVersionDispatchingCodecBuilder once fully applied.1 parent 15fa68c commit b77334f
File tree
15 files changed
+231
-199
lines changed- packages/dds/tree/src
- codec
- feature-libraries
- schema-edits
- test
- snapshots/output
- codec-tree
15 files changed
+231
-199
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
205 | 226 | | |
206 | 227 | | |
207 | 228 | | |
| |||
398 | 419 | | |
399 | 420 | | |
400 | 421 | | |
| 422 | + | |
401 | 423 | | |
402 | 424 | | |
403 | 425 | | |
| |||
529 | 551 | | |
530 | 552 | | |
531 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
532 | 562 | | |
533 | 563 | | |
534 | 564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | | - | |
200 | | - | |
201 | 199 | | |
202 | 200 | | |
203 | 201 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 6 | + | |
11 | 7 | | |
12 | 8 | | |
Lines changed: 8 additions & 59 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 8 | + | |
18 | 9 | | |
19 | 10 | | |
20 | 11 | | |
21 | 12 | | |
22 | 13 | | |
23 | 14 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 15 | + | |
65 | 16 | | |
66 | | - | |
| 17 | + | |
67 | 18 | | |
68 | | - | |
| 19 | + | |
69 | 20 | | |
70 | | - | |
| 21 | + | |
71 | 22 | | |
72 | | - | |
73 | | - | |
| 23 | + | |
| 24 | + | |
74 | 25 | | |
75 | 26 | | |
76 | 27 | | |
| |||
80 | 31 | | |
81 | 32 | | |
82 | 33 | | |
83 | | - | |
| 34 | + | |
84 | 35 | | |
85 | 36 | | |
86 | 37 | | |
| |||
91 | 42 | | |
92 | 43 | | |
93 | 44 | | |
94 | | - | |
95 | | - | |
96 | 45 | | |
Lines changed: 11 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
25 | | - | |
26 | 23 | | |
27 | 24 | | |
28 | | - | |
29 | | - | |
| 25 | + | |
| 26 | + | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 45 | | |
52 | 46 | | |
53 | 47 | | |
| |||
56 | 50 | | |
57 | 51 | | |
58 | 52 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
69 | 57 | | |
70 | 58 | | |
71 | 59 | | |
72 | 60 | | |
73 | 61 | | |
74 | | - | |
75 | 62 | | |
76 | 63 | | |
77 | 64 | | |
| |||
117 | 104 | | |
118 | 105 | | |
119 | 106 | | |
120 | | - | |
121 | 107 | | |
122 | 108 | | |
123 | 109 | | |
124 | 110 | | |
125 | 111 | | |
126 | 112 | | |
127 | | - | |
128 | 113 | | |
129 | 114 | | |
130 | 115 | | |
131 | 116 | | |
132 | 117 | | |
133 | 118 | | |
134 | | - | |
135 | 119 | | |
136 | 120 | | |
137 | 121 | | |
| |||
140 | 124 | | |
141 | 125 | | |
142 | 126 | | |
143 | | - | |
| 127 | + | |
144 | 128 | | |
145 | 129 | | |
146 | 130 | | |
147 | 131 | | |
148 | 132 | | |
149 | 133 | | |
150 | | - | |
| 134 | + | |
151 | 135 | | |
152 | 136 | | |
153 | 137 | | |
| |||
159 | 143 | | |
160 | 144 | | |
161 | 145 | | |
162 | | - | |
163 | | - | |
| 146 | + | |
164 | 147 | | |
165 | 148 | | |
166 | 149 | | |
167 | 150 | | |
168 | 151 | | |
169 | 152 | | |
| 153 | + | |
170 | 154 | | |
171 | 155 | | |
172 | 156 | | |
| |||
187 | 171 | | |
188 | 172 | | |
189 | 173 | | |
190 | | - | |
| 174 | + | |
191 | 175 | | |
192 | 176 | | |
193 | 177 | | |
| |||
Lines changed: 23 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
18 | 31 | | |
19 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments