Repository navigation
fix(analytics): default optional builder params to null - #1893
Merged
Merged
Conversation
The generated builders gave optional properties no default, so adding an optional property to an existing event broke every call site. Emit `= null` for nullable params, including the amount group's. Also order checkAnalyticsEventsPage after writeAnalyticsEventsPage so both can run in one invocation.
bmc08gt
marked this pull request as ready for review
October 30, 2026 03:16
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two build-logic problems in the analytics catalogue.
Optional params had no default.
KotlinEmitter.builder()emitted nullable params asname: Type?with no default, so adding an optional property to an existing event breaks every Android call site. #1889 (GroupEvents.newOpened()) and #1890 (TransferEvents.sentCash) both had to edit app code for that reason. The emitter now writes= nullfor every nullable param, including the amount group's optionalamount: Amount?, which goes through the sameParam. Required params are unchanged. Kotlin/Native's ObjC export drops default arguments, so the Swift API is unchanged.writeAnalyticsEventsPage+checkAnalyticsEventsPagein one invocation failed. On a clean tree,./gradlew writeAnalyticsEventsPage checkAnalyticsEventsPageran the check first and failed with "EVENTS.md is out of date", while each task passes alone. The check task nowmustRunAfterthe write task.EVENTS.mdis unchanged.AnalyticsCatalogueTestnow expects= nullon the optional-param and amount-group cases.Once this merges, the null-passing edits in #1889 and #1890 can be reverted.