Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(profiles): Bump android-trace-log version to prevent panic #2457

Merged
merged 4 commits into from
Sep 4, 2023

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Sep 3, 2023

@jjbayer jjbayer marked this pull request as ready for review September 4, 2023 07:14
@jjbayer jjbayer requested review from a team September 4, 2023 07:14
@@ -15,7 +15,7 @@ debug = true

[workspace.dependencies]
anyhow = "1.0.66"
chrono = { version = "0.4.24", default-features = false, features = [
chrono = { version = "0.4.28", default-features = false, features = [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

android_trace_log uses a chrono function that is not available in 0.4.24.

@@ -130,7 +130,8 @@ impl UnixTimestamp {

/// Returns the timestamp as chrono datetime.
pub fn as_datetime(self) -> Option<DateTime<Utc>> {
NaiveDateTime::from_timestamp_opt(self.0 as i64, 0).map(|n| DateTime::from_utc(n, Utc))
NaiveDateTime::from_timestamp_opt(self.0 as i64, 0)
.map(|n| DateTime::from_naive_utc_and_offset(n, Utc))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from_utc is deprecated since chrono 0.4.27. The function does the same under the hood.

Copy link
Contributor

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a test?

Copy link
Contributor

@TBS1996 TBS1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iker-barriocanal he wrote a test in android_trace_log if that counts 😛 https://github.com/chayleaf/android-trace-log/pull/2/files

@jjbayer
Copy link
Member Author

jjbayer commented Sep 4, 2023

he wrote a test in android_trace_log if that counts 😛 https://github.com/chayleaf/android-trace-log/pull/2/files

@iker-barriocanal the test would replicate the one that @TBS1996 linked, so it would not add value IMO.

@jjbayer jjbayer merged commit d6e110b into master Sep 4, 2023
17 checks passed
@jjbayer jjbayer deleted the fix/use-android-trace-log-0.3.0 branch September 4, 2023 09:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic in android_trace_log
3 participants