Skip to content

Commit 2984030

Browse files
committed
chore(ffi): configure the sentry dependency differently on android
On Android, we should use rustls instead of native-tls; this requires unsetting the default features of the `sentry` crate, and specifying them by hand instead. For consistency, I've done the same for the non-android sentry dependency.
1 parent a3c82e9 commit 2984030

File tree

2 files changed

+47
-35
lines changed

2 files changed

+47
-35
lines changed

Cargo.lock

Lines changed: 20 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/matrix-sdk-ffi/Cargo.toml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ matrix-sdk-ui = { workspace = true, features = ["uniffi"] }
3434
mime = "0.3.16"
3535
once_cell = { workspace = true }
3636
ruma = { workspace = true, features = ["html", "unstable-unspecified", "unstable-msc3488", "compat-unset-avatar", "unstable-msc3245-v1-compat", "unstable-msc4278"] }
37-
sentry = { workspace = true }
38-
sentry-tracing = { workspace = true }
37+
sentry-tracing = "0.36.0"
3938
serde = { workspace = true }
4039
serde_json = { workspace = true }
4140
thiserror = { workspace = true }
@@ -53,6 +52,32 @@ language-tags = "0.3.2"
5352
[target.'cfg(target_os = "android")'.dependencies]
5453
paranoid-android = "0.2.1"
5554

55+
[target.'cfg(target_os = "android")'.dependencies.sentry]
56+
version = "0.36.0"
57+
default-features = false
58+
features = [
59+
# TLS lib specific for Android.
60+
"rustls",
61+
# Most default features enabled otherwise.
62+
"backtrace",
63+
"contexts",
64+
"panic",
65+
"reqwest"
66+
]
67+
68+
[target.'cfg(not(target_os = "android"))'.dependencies.sentry]
69+
version = "0.36.0"
70+
default-features = false
71+
features = [
72+
# TLS lib used on non-Android platforms.
73+
"native-tls",
74+
# Most default features enabled otherwise.
75+
"backtrace",
76+
"contexts",
77+
"panic",
78+
"reqwest"
79+
]
80+
5681
[target.'cfg(target_os = "android")'.dependencies.matrix-sdk]
5782
workspace = true
5883
features = [

0 commit comments

Comments
 (0)