FluidFramework
FluidFramework copied to clipboard
tree: Add data input and output APIs
Description
Currently tree has some issues related to ambiguity. Some ways to round trip data can lose type information in some cases.
This PR shows how to detect and avoid schema with those problems, and provides APIs to do data input put and out which leverage that, as well as avoid it (the verbose APIs).
Reviewer Guidance
The review process is outlined on this wiki page.
Details like incorrect API tagging, missing exports, missing implementations are known: feedback on them is not needed yet.
Open Questions:
- How should error handling work? create can fail due to ambiguity of invalid data (ex: NaN), but we might also want a version that takes more relaxed type, and thus can error in more cases. Should it error as thrown exceptions, or report back structured errors? Maybe ad a tryCreate that returns errors?
⚠️ No Changeset found
Latest commit: 6b9d4b98931a638ef44d2645358ded63f2748fd0
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
⯅ @fluid-example/bundle-size-tests: +245 Bytes
| Metric Name | Baseline Size | Compare Size | Size Diff |
|---|---|---|---|
| aqueduct.js | 460.88 KB | 460.92 KB | ⯅ +35 Bytes |
| azureClient.js | 559.03 KB | 559.08 KB | ⯅ +49 Bytes |
| connectionState.js | 680 Bytes | 680 Bytes | ■ No change |
| containerRuntime.js | 261.68 KB | 261.69 KB | ⯅ +14 Bytes |
| fluidFramework.js | 401.63 KB | 401.64 KB | ⯅ +14 Bytes |
| loader.js | 134.17 KB | 134.19 KB | ⯅ +14 Bytes |
| map.js | 42.43 KB | 42.44 KB | ⯅ +7 Bytes |
| matrix.js | 146.59 KB | 146.6 KB | ⯅ +7 Bytes |
| odspClient.js | 526.18 KB | 526.23 KB | ⯅ +49 Bytes |
| odspDriver.js | 97.8 KB | 97.82 KB | ⯅ +21 Bytes |
| odspPrefetchSnapshot.js | 42.76 KB | 42.78 KB | ⯅ +14 Bytes |
| sharedString.js | 163.27 KB | 163.28 KB | ⯅ +7 Bytes |
| sharedTree.js | 392.09 KB | 392.1 KB | ⯅ +7 Bytes |
| Total Size | 3.3 MB | 3.3 MB | ⯅ +245 Bytes |
Baseline commit: 9219dc8c3831af699ebceb9a0a306272c9fe4933
Generated by :no_entry_sign: dangerJS against 86778130fe8e70d9fe85ce5c291817334496109e
Better versions of these API (implemented and with some testing) are in https://github.com/microsoft/FluidFramework/pull/22566