-
Notifications
You must be signed in to change notification settings - Fork 32
Remove Desugaring Requirement By Removing Instant.now() #154
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
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #154 +/- ##
============================================
- Coverage 79.31% 79.26% -0.05%
+ Complexity 479 474 -5
============================================
Files 74 74
Lines 5979 5965 -14
Branches 719 719
============================================
- Hits 4742 4728 -14
Misses 670 670
Partials 567 567
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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. let's remove all the desugaring
setup and dependencies before merge in
@@ -89,6 +89,7 @@ open class Analytics protected constructor( | |||
Analytics.segmentLog( | |||
"Caught Exception in Analytics Scope: ${t}" | |||
) | |||
t.printStackTrace() |
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.
do we need this here?
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.
Hmm....No. I will add that and probably more like it in a follow up PR. It's a nice to have.
@@ -32,6 +33,8 @@ class EventsFileTests { | |||
|
|||
init { | |||
mockkStatic(Instant::class) | |||
mockkStatic(::dateTimeNowString) | |||
every { dateTimeNowString() } returns Date(0).toInstant().toString() |
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.
do we need to replace toInstant
too? looks like it's returning an Instant
value. would that require desugaring?
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.
Not in our tests. I let all of those keep the use of the Instant classes. Instant was only removed from code that runs on the device.
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.
hmm. I wonder if it's still available after we removed all the desugaring setup and the dependency
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.
Yes. It is still available because the test run locally using java 11. I have updated the code to remove desugaring from the android build.gradle and re-run the test and they still all pass.
No description provided.