-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
feat: allow partial sdk info override #1816
Conversation
|
Sources/Sentry/SentrySdkInfo.m
Outdated
@@ -44,6 +44,25 @@ - (instancetype)initWithDict:(NSDictionary *)dict | |||
return [self initWithName:name andVersion:version]; |
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.
I wanted to reuse the new method with sth like:
return [self initWithDict:dict orDefaults:nil];
but that would require the arg to be nullable - do you want me to make the change?
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.
I would prefer if we could reuse the new method. We could also define an internal constructor that both initWithDict:
and initWithDict:orDefaults
use. Then we don't need to make the orDefaults
nullable.
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.
tried here, not sure that's the right way in objective-c though: 80edcb8
Codecov Report
@@ Coverage Diff @@
## master #1816 +/- ##
==========================================
- Coverage 92.16% 92.10% -0.06%
==========================================
Files 198 198
Lines 9062 9070 +8
==========================================
+ Hits 8352 8354 +2
- Misses 710 716 +6
Continue to review full report at Codecov.
|
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.
LGTM
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.
Thanks. The test that is failing is flaky. We are working on fixing it #1756
📜 Description
💡 Motivation and Context
Turns out we want to keep the sentry-cocoa SDK version when overriding the name while integrated in the sentry-unity SDK. This PR enables doing that.
💚 How did you test it?
new unit tests
📝 Checklist