commit 7e9f69c028696d70e07ea887595a7103d6f85baa
parent cb8a40fa4473a741bc56eaf638c3f880b16c791d
Author: Marcel <mtrnord1@gmail.com>
Date: Sat, 25 Jul 2020 18:39:48 +0200
Fix debug builds, switch back to upstream sdk and replace deprecated method
Took 6 minutes
Diffstat:
4 files changed, 56 insertions(+), 26 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
@@ -819,7 +819,7 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
[[package]]
name = "matrix-sdk"
version = "0.1.0"
-source = "git+https://github.com/MTRNord/matrix-rust-sdk?branch=daydream#38723121e029881c0c32de026619e037e15e5bac"
+source = "git+https://github.com/matrix-org/matrix-rust-sdk#d4fe2fe0a2575e788e12aa6aea05bdd383a85d68"
dependencies = [
"futures-timer",
"http",
@@ -837,7 +837,7 @@ dependencies = [
[[package]]
name = "matrix-sdk-base"
version = "0.1.0"
-source = "git+https://github.com/MTRNord/matrix-rust-sdk?branch=daydream#38723121e029881c0c32de026619e037e15e5bac"
+source = "git+https://github.com/matrix-org/matrix-rust-sdk#d4fe2fe0a2575e788e12aa6aea05bdd383a85d68"
dependencies = [
"async-trait",
"matrix-sdk-common",
@@ -853,7 +853,7 @@ dependencies = [
[[package]]
name = "matrix-sdk-common"
version = "0.1.0"
-source = "git+https://github.com/MTRNord/matrix-rust-sdk?branch=daydream#38723121e029881c0c32de026619e037e15e5bac"
+source = "git+https://github.com/matrix-org/matrix-rust-sdk#d4fe2fe0a2575e788e12aa6aea05bdd383a85d68"
dependencies = [
"futures-locks",
"instant",
@@ -866,7 +866,7 @@ dependencies = [
[[package]]
name = "matrix-sdk-common-macros"
version = "0.1.0"
-source = "git+https://github.com/MTRNord/matrix-rust-sdk?branch=daydream#38723121e029881c0c32de026619e037e15e5bac"
+source = "git+https://github.com/matrix-org/matrix-rust-sdk#d4fe2fe0a2575e788e12aa6aea05bdd383a85d68"
dependencies = [
"quote 1.0.7",
"syn 1.0.35",
@@ -1213,24 +1213,25 @@ checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac"
[[package]]
name = "ruma"
version = "0.1.0"
-source = "git+https://github.com/ruma/ruma?rev=9190bff1d03fb188aa1d24502129f9dd19a824e6#9190bff1d03fb188aa1d24502129f9dd19a824e6"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
dependencies = [
"ruma-api",
"ruma-client-api",
"ruma-common",
"ruma-events",
- "ruma-identifiers",
+ "ruma-identifiers 0.17.0 (git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3)",
+ "ruma-identifiers-macros",
]
[[package]]
name = "ruma-api"
version = "0.16.1"
-source = "git+https://github.com/ruma/ruma?rev=9190bff1d03fb188aa1d24502129f9dd19a824e6#9190bff1d03fb188aa1d24502129f9dd19a824e6"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
dependencies = [
"http",
"percent-encoding",
"ruma-api-macros",
- "ruma-identifiers",
+ "ruma-identifiers 0.17.0 (git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3)",
"ruma-serde",
"serde",
"serde_json",
@@ -1240,9 +1241,8 @@ dependencies = [
[[package]]
name = "ruma-api-macros"
version = "0.16.1"
-source = "git+https://github.com/ruma/ruma?rev=9190bff1d03fb188aa1d24502129f9dd19a824e6#9190bff1d03fb188aa1d24502129f9dd19a824e6"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
dependencies = [
- "matches",
"proc-macro2 1.0.19",
"quote 1.0.7",
"syn 1.0.35",
@@ -1251,14 +1251,14 @@ dependencies = [
[[package]]
name = "ruma-client-api"
version = "0.9.0"
-source = "git+https://github.com/ruma/ruma?rev=9190bff1d03fb188aa1d24502129f9dd19a824e6#9190bff1d03fb188aa1d24502129f9dd19a824e6"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
dependencies = [
"http",
"js_int",
"ruma-api",
"ruma-common",
"ruma-events",
- "ruma-identifiers",
+ "ruma-identifiers 0.17.0 (git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3)",
"ruma-serde",
"serde",
"serde_json",
@@ -1267,11 +1267,10 @@ dependencies = [
[[package]]
name = "ruma-common"
-version = "0.1.3"
-source = "git+https://github.com/ruma/ruma?rev=9190bff1d03fb188aa1d24502129f9dd19a824e6#9190bff1d03fb188aa1d24502129f9dd19a824e6"
+version = "0.2.0"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
dependencies = [
"js_int",
- "matches",
"ruma-serde",
"serde",
"serde_json",
@@ -1281,12 +1280,12 @@ dependencies = [
[[package]]
name = "ruma-events"
version = "0.21.3"
-source = "git+https://github.com/ruma/ruma?rev=9190bff1d03fb188aa1d24502129f9dd19a824e6#9190bff1d03fb188aa1d24502129f9dd19a824e6"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
dependencies = [
"js_int",
"ruma-common",
"ruma-events-macros",
- "ruma-identifiers",
+ "ruma-identifiers 0.17.0 (git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3)",
"ruma-serde",
"serde",
"serde_json",
@@ -1296,9 +1295,8 @@ dependencies = [
[[package]]
name = "ruma-events-macros"
version = "0.21.3"
-source = "git+https://github.com/ruma/ruma?rev=9190bff1d03fb188aa1d24502129f9dd19a824e6#9190bff1d03fb188aa1d24502129f9dd19a824e6"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
dependencies = [
- "matches",
"proc-macro2 1.0.19",
"quote 1.0.7",
"syn 1.0.35",
@@ -1306,18 +1304,38 @@ dependencies = [
[[package]]
name = "ruma-identifiers"
-version = "0.17.0-pre.1"
-source = "git+https://github.com/ruma/ruma?rev=9190bff1d03fb188aa1d24502129f9dd19a824e6#9190bff1d03fb188aa1d24502129f9dd19a824e6"
+version = "0.17.0"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
+dependencies = [
+ "serde",
+ "strum",
+]
+
+[[package]]
+name = "ruma-identifiers"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7046d6ff26cf4f5b8bc77af68527544c61e32cab5810c40035c6491c08da0d3"
dependencies = [
- "matches",
"serde",
"strum",
]
[[package]]
+name = "ruma-identifiers-macros"
+version = "0.17.0"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
+dependencies = [
+ "proc-macro2 1.0.19",
+ "quote 1.0.7",
+ "ruma-identifiers 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.35",
+]
+
+[[package]]
name = "ruma-serde"
version = "0.2.2"
-source = "git+https://github.com/ruma/ruma?rev=9190bff1d03fb188aa1d24502129f9dd19a824e6#9190bff1d03fb188aa1d24502129f9dd19a824e6"
+source = "git+https://github.com/ruma/ruma?rev=ea2992a4120d34495d6f07f141350d8f2a3429d3#ea2992a4120d34495d6f07f141350d8f2a3429d3"
dependencies = [
"form_urlencoded",
"itoa",
diff --git a/Cargo.toml b/Cargo.toml
@@ -33,7 +33,8 @@ yew-router = { git = "https://github.com/daydream-mx/yew.git", branch = "MTRNord
yewtil = { git = "https://github.com/daydream-mx/yew.git", branch = "MTRNord/daydream-no-bincode" }
# Matrix
-matrix-sdk = { version = "0.1.0", git = "https://github.com/MTRNord/matrix-rust-sdk", branch = "daydream", default-features = false, features = ["messages"]}# features = ["encryption"]}
+#, branch = "daydream"
+matrix-sdk = { version = "0.1.0", git = "https://github.com/matrix-org/matrix-rust-sdk", default-features = false, features = ["messages"]}# features = ["encryption"]}
url = "2.1.1"
thiserror = "1.0"
futures-locks = { git = "https://github.com/asomers/futures-locks", default-features = false }
diff --git a/Makefile.toml b/Makefile.toml
@@ -36,7 +36,7 @@ dependencies = ["format", "wasm-clean", "update-translations", "dist-folder", "s
[tasks.dist-debug]
# TODO add scss task when it works
-dependencies = ["format", "wasm-clean", "update-translations", "dist-folder", "scss", "pure-build-app-debug", "wasm-build", "pure-build-worker-debug", "wasm-build-worker", "copy-files"]
+dependencies = ["format", "wasm-clean", "update-translations", "dist-folder", "scss", "pure-build-app-debug", "wasm-build-debug", "pure-build-worker-debug", "wasm-build-worker-debug", "copy-files"]
[tasks.run]
watch = {watch = ["./src", "./static", "./startup_helper"], poll = true}
@@ -77,6 +77,17 @@ install_crate = { crate_name = "wasm-bindgen-cli", binary = "wasm-bindgen", test
command = "wasm-bindgen"
args = ["--no-typescript", "--out-dir", "./dist/", "--target", "no-modules", "--out-name", "worker", "./target/wasm32-unknown-unknown/release/daydream_worker.wasm"]
+[tasks.wasm-build-debug]
+install_crate = { crate_name = "wasm-bindgen-cli", binary = "wasm-bindgen", test_arg = "--help" }
+command = "wasm-bindgen"
+args = ["--no-typescript", "--debug", "--out-dir", "./dist/", "--target", "web", "--out-name", "daydream", "./target/wasm32-unknown-unknown/debug/daydream_app.wasm"]
+
+[tasks.wasm-build-worker-debug]
+install_crate = { crate_name = "wasm-bindgen-cli", binary = "wasm-bindgen", test_arg = "--help" }
+command = "wasm-bindgen"
+args = ["--no-typescript", "--debug", "--out-dir", "./dist/", "--target", "no-modules", "--out-name", "worker", "./target/wasm32-unknown-unknown/debug/daydream_worker.wasm"]
+
+
[tasks.copy-files]
# TODO use rust
script_runner = "@shell"
diff --git a/src/app/matrix/mod.rs b/src/app/matrix/mod.rs
@@ -389,7 +389,7 @@ impl Agent for MatrixAgent {
formatted_message.pop();
let content = if formatted_message == message {
- MessageEventContent::Text(TextMessageEventContent::new_plain(message))
+ MessageEventContent::Text(TextMessageEventContent::plain(message))
} else {
MessageEventContent::Text(TextMessageEventContent {
body: message,