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

[Plat-11007] null user components #1599

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Conversation

kstenerud
Copy link
Contributor

Goal

Setting user fields to nil wouldn't clear out their values when serializing a report because [user toJson] would produce dictionaries with the null fields missing, and then when merged with the existing data the old data would remain (because there's no new field value to override the old).

This PR ensures that the user object's produced dictionary always contains all keys, even if they've been set to null.

Testing

Added unit tests.

Copy link

github-actions bot commented Nov 2, 2023

Bugsnag.framework binary size increased by 144 bytes from 713,104 to 713,248

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3%    +636  +0.3%    +636    __TEXT,__text
  +0.1%     +80  +0.1%     +80    Symbol Table
  +0.0%     +64  +0.0%     +64    String Table
  +0.1%     +24  +0.1%     +24    __DATA,__objc_const
  +0.1%     +18  +0.1%     +18    __TEXT,__objc_methname
  +0.2%      +8  +0.2%      +8    __DATA,__objc_selrefs
  +0.1%      +4  +0.1%      +4    __TEXT,__unwind_info
  -0.5%     -32  -0.2%     -32    [__DATA]
  [ = ]       0  -1.8%    -144    [__LINKEDIT]
  -3.4%    -658  -3.4%    -658    [__TEXT]
  +0.0%    +144  [ = ]       0    TOTAL

Generated by 🚫 Danger

@kstenerud kstenerud force-pushed the PLAT-11007-null-user-components-2 branch from c7b9698 to 7e2d056 Compare November 7, 2023 09:42
@kstenerud kstenerud merged commit d7edee0 into next Nov 8, 2023
@kstenerud kstenerud deleted the PLAT-11007-null-user-components-2 branch November 8, 2023 08:04
@kstenerud kstenerud mentioned this pull request Nov 15, 2023
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.

2 participants