Page MenuHomePhabricator

[lib] Narrow `ClientFullStateSync` to `MinimallyEncodedRawThreadInfos`
ClosedPublic

Authored by atul on Jan 11 2024, 9:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 12:33 AM
Unknown Object (File)
Thu, Nov 7, 6:36 AM
Unknown Object (File)
Oct 27 2024, 4:26 AM
Unknown Object (File)
Oct 16 2024, 3:45 AM
Unknown Object (File)
Oct 16 2024, 3:45 AM
Unknown Object (File)
Oct 16 2024, 3:45 AM
Unknown Object (File)
Oct 16 2024, 3:45 AM
Unknown Object (File)
Oct 16 2024, 3:45 AM
Subscribers

Details

Summary

Similar to D10606 and D10608, this will allow us to remove invariant from D10588.


Depends on D10608

Test Plan

NA, flow

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jan 11 2024, 9:35 AM
Harbormaster failed remote builds in B25705: Diff 35546!
atul published this revision for review.Jan 11 2024, 9:45 AM
atul planned changes to this revision.

pre-commit hooks aren't catching flow issues in keyserver, will try a clean install

This looks good, but the use of the type spread operator breaks the read-only-ness of these types. This wasn't something I was aware of at the time the types were introduced. Would you mind making them read-only in this diff?

lib/types/socket-types.js
201–205 ↗(On Diff #35553)

Wrap in $ReadOnly

206–210 ↗(On Diff #35553)

Wrap in $ReadOnly

211–216 ↗(On Diff #35553)

Wrap in $ReadOnly

218–222 ↗(On Diff #35553)

Wrap in $ReadOnly

229–234 ↗(On Diff #35553)

Wrap in $ReadOnly

Ah, missed the plan changes – feel free to re-request review later if there are any significant changes

This revision is now accepted and ready to land.Jan 13 2024, 12:07 AM
lib/types/socket-types.js
229

Get the following when I try making this $ReadOnly:

922a45.png (754×1 px, 374 KB)

Going to land as is, created a task to track making ServerStateSyncFullSocketPayload ReadOnly: https://linear.app/comm/issue/ENG-6515/make-serverstatesyncfullsocketpayload-readonly

Worth noting that ServerStateSyncFullSocketPayload was not part of this diff.