-
Notifications
You must be signed in to change notification settings - Fork 549
refactor(presence): Use branded JsonDeserialized type internally #24641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jason-ha
reviewed
May 15, 2025
jason-ha
reviewed
May 15, 2025
jason-ha
reviewed
May 15, 2025
jason-ha
reviewed
May 15, 2025
f6391fb
to
1c54887
Compare
jason-ha
reviewed
Jun 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like all of these are incorrect. Likely you imported from the wrong path somewhere. See the note on lines 15-18.
…able Filtering the inner type when applying additional `JsonSerializable` filters broken the result down into `JsonTypeWith | Opaque` degenerate substitutes when `unknown` was sufficient already and would break the filter type checking. Now preserve the Opaque type's `T` as-is and rely on changes in `Controls` to dictate incompatibility.
This is required to allow `system:presence` workspace's datastore to deviated from the common general workspace datastore. This also removes test workarounds when specifying `clientToSessionId` records.
…able Filtering the inner type when applying additional `JsonSerializable` filters broken the result down into `JsonTypeWith | Opaque` degenerate substitutes when `unknown` was sufficient already and would break the filter type checking. Now preserve the Opaque type's `T` as-is and rely on changes in `Controls` to dictate incompatibility.
This is required to allow `system:presence` workspace's datastore to deviated from the common general workspace datastore. This also removes test workarounds when specifying `clientToSessionId` records.
…ral-datastore-typing' into presence-type-branding
- `serializableToOpaqueJson` -> `toOpaqueJson` - `asDeserializedJson` -> `revealOpaqueJson`
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
This change is superseded by #24772. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: framework
Framework is a tag for issues involving the developer framework. Eg Aqueduct
base: main
PRs targeted against main branch
public api change
Changes to a public API
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates the presence internals to use an opaque/branded internal type when passing around JSON objects. There are two functions to make JSON types opaque/not opaque, as well as a helper that casts from an opaque JSON type to a
DeeplyReadonly<JsonDeserialized<T>>
object since that is what we often need.Externally, the API remains the same; the internal types and functions are marked
@system
and objects are converted between the types at the API boundaries.There were API level mismatches with the Notifications changes, so I marked
InternalUtilityTypes
as alpha. Is there a better change? Similarly, the core-interfaces types needed to be beta since the presence APIs are marked as such.