Skip to content
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

fix: make field truly optional #12

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

DominicGBauer
Copy link
Contributor

Description

I saw this issue appear now that we fixed allowing write_checkpoint to be nullable.

SyncStream::streamingSync Error: kotlinx.serialization.MissingFieldException: Field 'write_checkpoint' is required for type with serial name 'com.powersync.sync.StreamingSyncCheckpointDiff', but it was missing

Work Done

Note we could also implement this system wide to avoid similar issues in future https://github.com/Kotlin/kotlinx.serialization/blob/v1.3.0-RC/docs/json.md#explicit-nulls

@DominicGBauer DominicGBauer self-assigned this Apr 8, 2024
@DominicGBauer DominicGBauer requested a review from Manrich121 April 8, 2024 12:28
@DominicGBauer
Copy link
Contributor Author

@Manrich121 Steven asked if you could comment on this please :) w.r.t. to setting explicitNull

@Manrich121
Copy link
Contributor

@Manrich121 Steven asked if you could comment on this please :) w.r.t. to setting explicitNull

This might also be relevant discussion #5 (comment)

So providing a default value there should be fine. Configuring JsonUtil to always expect explicit nulls, might impact things unexpectedly

@DominicGBauer DominicGBauer merged commit ed71eb5 into main Apr 9, 2024
3 checks passed
@DominicGBauer DominicGBauer deleted the fix/write-checkpoint-missing-2 branch April 9, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants