Commit df53390
Update how shared tree codec versions are generated (#25752)
This change updates how the write version for the different codecs in
tree are determined.
Currently, there is a mapping of `SharedTreeFormatVersion` to a list of
write versions for all codecs. The `SharedTreeFormatVersion` is one of
the options that can be passed when creating a tree and the codecs
version are selected from the mapping based on this value.
With this change, `SharedTreeFormatVersion` will be removed. Instead,
the write versions for the codecs will be selected based on the
`minVersionForCollab` option that is also passed during tree creation.
The `minVersionForCollab` will be passed down to each codec and it can
decide what write version it wants based on this.
This PR also standardizes how the various versions are maintained by the
codecs (using an `as const` enum-like object and branded values, and a
function that generates the right version based on the
`minVersionForCollab`).
The mapping from `SharedTreeFormatVersion` to `minVersionForCollab` is
as follows:
* `SharedTreeFormatVersion.v1`: no longer an option
* `SharedTreeFormatVersion.v2`: no longer an option
* `SharedTreeFormatVersion.v3`: `minVersionForCollab:
FluidClientVersion.v2_0`
* `SharedTreeFormatVersion.v4`: was never an option, still not an option
* `SharedTreeFormatVersion.v5`: `minVersionForCollab:
FluidClientVersion.v2_43`
* `SharedTreeFormatVersion.vSharedBranches`: no longer an option. Use
`SharedTreeOptions.enableSharedBranches` instead.
Unchanged: specifying `minVersionForCollab: FluidClientVersion.v2_52`
will enable `DetachedFieldIndexFormatVersion.v2`.
[AB#51463](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/51463).
## Breaking Changes
`SharedTreeFormatOptions` (internal) no longer has a `formatVersion`
field.
---------
Co-authored-by: yann-achard-MS <97201204+yann-achard-MS@users.noreply.github.com>1 parent 39cecea commit df53390
File tree
256 files changed
+1484
-28636
lines changed- .changeset
- packages
- dds/tree
- api-report
- src
- codec
- core
- schema-stored
- tree
- feature-libraries
- chunked-forest
- codec
- forest-summary
- schema-edits
- schema-index
- simple-tree/api
- test
- core/tree
- feature-libraries
- chunked-forest
- codec
- forest-summary
- modular-schema
- schema-index
- snapshots
- output
- codec-tree
- op-format
- v1
- v2_0
- v2_43
- v2_52
- summary
- Compressed
- v1
- v2_0
- v2_43
- v2_52
- v2
- Uncompressed
- v1
- v2_0
- v2_43
- v2_52
- v2
- framework/fluid-framework/api-report
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
256 files changed
+1484
-28636
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| 323 | + | |
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
| |||
998 | 999 | | |
999 | 1000 | | |
1000 | 1001 | | |
1001 | | - | |
1002 | 1002 | | |
1003 | 1003 | | |
1004 | 1004 | | |
| |||
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | | - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1019 | 1021 | | |
1020 | 1022 | | |
1021 | 1023 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
502 | | - | |
503 | | - | |
504 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
505 | 519 | | |
506 | 520 | | |
507 | 521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
| 154 | + | |
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | | - | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| 16 | + | |
| 17 | + | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| |||
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
69 | | - | |
| 67 | + | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
Lines changed: 33 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
28 | 41 | | |
29 | 42 | | |
30 | 43 | | |
31 | 44 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
35 | 49 | | |
36 | 50 | | |
37 | 51 | | |
| |||
40 | 54 | | |
41 | 55 | | |
42 | 56 | | |
43 | | - | |
44 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
45 | 65 | | |
46 | 66 | | |
47 | 67 | | |
48 | | - | |
49 | 68 | | |
50 | | - | |
| 69 | + | |
51 | 70 | | |
52 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
53 | 75 | | |
0 commit comments