From 3ff3b8f8946838c286757b93780524a0be9b1e71 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:19:53 +0000 Subject: [PATCH 1/5] chore(deps) Update Tauri Core --- core/tauri/Cargo.toml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index ef6e3309cdba..aeda92661bcf 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -43,7 +43,7 @@ serde = { version = "1.0", features = [ "derive" ] } tokio = { version = "1", features = [ "rt", "rt-multi-thread", "sync", "fs", "io-util" ] } futures-util = "0.3" uuid = { version = "1", features = [ "v4" ] } -url = { version = "2.3" } +url = { version = "2.4" } anyhow = "1.0" thiserror = "1.0" once_cell = "1" @@ -56,25 +56,25 @@ serde_repr = "0.1" state = "0.6" http = "0.2" dirs-next = "2.0" -percent-encoding = "2.2" +percent-encoding = "2.3" reqwest = { version = "0.11", default-features = false, features = [ "json", "stream" ] } bytes = { version = "1", features = [ "serde" ] } raw-window-handle = "0.5" glob = "0.3" -data-url = { version = "0.2", optional = true } +data-url = { version = "0.3", optional = true } serialize-to-javascript = "=0.1.1" -infer = { version = "0.9", optional = true } +infer = { version = "0.15", optional = true } png = { version = "0.17", optional = true } -ico = { version = "0.2.0", optional = true } +ico = { version = "0.3.0", optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -gtk = { version = "0.16", features = [ "v3_24" ] } -glib = "0.16" +gtk = { version = "0.17", features = [ "v3_24" ] } +glib = "0.17" webkit2gtk = { version = "1.1", features = [ "v2_38" ] } [target."cfg(target_os = \"macos\")".dependencies] embed_plist = "1.2" -cocoa = "0.24" +cocoa = "0.25" objc = "0.2" [target."cfg(windows)".dependencies] @@ -89,13 +89,13 @@ log = "0.4" heck = "0.4" [target."cfg(target_os = \"android\")".dependencies] -jni = "0.20" +jni = "0.21" [target."cfg(target_os = \"ios\")".dependencies] libc = "0.2" objc = "0.2" -cocoa = "0.24" -swift-rs = "1.0.4" +cocoa = "0.25" +swift-rs = "1.0.5" [build-dependencies] heck = "0.4" @@ -103,7 +103,7 @@ once_cell = "1" tauri-build = { path = "../tauri-build/", version = "2.0.0-alpha.1" } [dev-dependencies] -proptest = "1.0.0" +proptest = "1.2.0" quickcheck = "1.0.3" quickcheck_macros = "1.0.0" serde = { version = "1.0", features = [ "derive" ] } From 790274bc6673dec6ebbfc655db782dd9cf0eaa01 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 8 Aug 2023 15:57:15 -0300 Subject: [PATCH 2/5] downgrade gtk --- core/tauri/Cargo.toml | 4 +- examples/api/src-tauri/Cargo.lock | 162 +++++++++++++++++++++++------- 2 files changed, 126 insertions(+), 40 deletions(-) diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index aeda92661bcf..b104deddbef8 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -68,8 +68,8 @@ png = { version = "0.17", optional = true } ico = { version = "0.3.0", optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -gtk = { version = "0.17", features = [ "v3_24" ] } -glib = "0.17" +gtk = { version = "0.16", features = [ "v3_24" ] } +glib = "0.16" webkit2gtk = { version = "1.1", features = [ "v2_38" ] } [target."cfg(target_os = \"macos\")".dependencies] diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 99fe15a24999..e09a3a5e7564 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -576,8 +576,24 @@ dependencies = [ "block", "cocoa-foundation", "core-foundation", - "core-graphics", - "foreign-types", + "core-graphics 0.22.3", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "cocoa" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +dependencies = [ + "bitflags", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics 0.23.1", + "foreign-types 0.5.0", "libc", "objc", ] @@ -592,7 +608,7 @@ dependencies = [ "block", "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", "libc", "objc", ] @@ -669,7 +685,20 @@ dependencies = [ "bitflags", "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" +dependencies = [ + "bitflags", + "core-foundation", + "core-graphics-types", + "foreign-types 0.5.0", "libc", ] @@ -681,7 +710,7 @@ checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ "bitflags", "core-foundation", - "foreign-types", + "foreign-types 0.3.2", "libc", ] @@ -1085,7 +1114,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", ] [[package]] @@ -1094,6 +1144,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.0" @@ -1670,16 +1726,6 @@ dependencies = [ "cxx-build", ] -[[package]] -name = "ico" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031530fe562d8c8d71c0635013d6d155bbfe8ba0aa4b4d2d24ce8af6b71047bd" -dependencies = [ - "byteorder", - "png", -] - [[package]] name = "ico" version = "0.3.0" @@ -1732,18 +1778,18 @@ dependencies = [ [[package]] name = "infer" -version = "0.9.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f178e61cdbfe084aa75a2f4f7a25a5bb09701a47ae1753608f194b15783c937a" +checksum = "a898e4b7951673fce96614ce5751d13c40fc5674bc2d759288e46c3ab62598b3" dependencies = [ "cfb", ] [[package]] name = "infer" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a898e4b7951673fce96614ce5751d13c40fc5674bc2d759288e46c3ab62598b3" +checksum = "cb33622da908807a06f9513c19b3c1ad50fab3e4137d82a78107d502075aa199" dependencies = [ "cfb", ] @@ -1844,6 +1890,22 @@ dependencies = [ "walkdir", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "jni-sys" version = "0.3.0" @@ -2351,7 +2413,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets", + "windows-targets 0.48.0", ] [[package]] @@ -3250,9 +3312,9 @@ dependencies = [ "bitflags", "cairo-rs", "cc", - "cocoa", + "cocoa 0.24.1", "core-foundation", - "core-graphics", + "core-graphics 0.22.3", "crossbeam-channel", "dirs-next", "dispatch", @@ -3267,7 +3329,7 @@ dependencies = [ "gtk", "image", "instant", - "jni", + "jni 0.20.0", "lazy_static", "libappindicator", "libc", @@ -3315,7 +3377,7 @@ version = "2.0.0-alpha.10" dependencies = [ "anyhow", "bytes", - "cocoa", + "cocoa 0.25.0", "dirs-next", "embed_plist", "futures-util", @@ -3324,9 +3386,9 @@ dependencies = [ "gtk", "heck", "http", - "ico 0.2.0", - "infer 0.9.0", - "jni", + "ico", + "infer 0.15.0", + "jni 0.21.1", "libc", "log", "objc", @@ -3382,7 +3444,7 @@ version = "2.0.0-alpha.6" dependencies = [ "base64", "brotli", - "ico 0.3.0", + "ico", "json-patch", "plist", "png", @@ -3432,7 +3494,7 @@ source = "git+https://github.com/tauri-apps/plugins-workspace?branch=next#4a10f2 dependencies = [ "android_logger", "byte-unit", - "cocoa", + "cocoa 0.24.1", "fern", "log", "objc", @@ -3463,7 +3525,7 @@ dependencies = [ "gtk", "http", "http-range", - "jni", + "jni 0.20.0", "rand 0.8.5", "raw-window-handle", "serde", @@ -3479,9 +3541,9 @@ dependencies = [ name = "tauri-runtime-wry" version = "0.13.0-alpha.6" dependencies = [ - "cocoa", + "cocoa 0.24.1", "gtk", - "jni", + "jni 0.20.0", "percent-encoding", "rand 0.8.5", "raw-window-handle", @@ -4197,7 +4259,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29d30320647cfc3dc45554c8ad825b84831def81f967a2f7589931328ff9b16d" dependencies = [ - "cocoa", + "cocoa 0.24.1", "objc", "raw-window-handle", "windows-sys 0.42.0", @@ -4211,7 +4273,7 @@ checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ "windows-implement", "windows-interface", - "windows-targets", + "windows-targets 0.48.0", ] [[package]] @@ -4267,13 +4329,37 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -4417,8 +4503,8 @@ checksum = "430d086d4626265e9427fe2908a06fb2e10ea2ff37d4a711eb9461b6ea3511dd" dependencies = [ "base64", "block", - "cocoa", - "core-graphics", + "cocoa 0.24.1", + "core-graphics 0.22.3", "crossbeam-channel", "dunce", "gdk", From 87539aa59328c6b3bdd27fa21b0aefc97025d7fb Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 8 Aug 2023 16:42:31 -0300 Subject: [PATCH 3/5] downgrade time --- .github/workflows/test-core.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 711eb5781f44..f619390335e1 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -98,6 +98,11 @@ jobs: workspaces: core -> ../target save-if: ${{ matrix.features.key == 'all' }} + - name: Downgrade crates with MSRV conflict + # The --precise flag can only be used once per invocation. + run: | + cargo update -p time --precise 0.3.23 + - name: test uses: actions-rs/cargo@v1 with: From c7a448bf84f063d50523e35df6546572ba982fbf Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 8 Aug 2023 16:56:16 -0300 Subject: [PATCH 4/5] wip jni update [skip ci] needs tao+wry update --- core/tauri-runtime-wry/Cargo.toml | 2 +- core/tauri-runtime/Cargo.toml | 2 +- core/tauri/src/jni_helpers.rs | 4 +-- examples/api/src-tauri/Cargo.lock | 4 +-- tooling/cli/Cargo.lock | 56 +++++++++++++++++-------------- 5 files changed, 37 insertions(+), 31 deletions(-) diff --git a/core/tauri-runtime-wry/Cargo.toml b/core/tauri-runtime-wry/Cargo.toml index f231896e88a8..a8c7f1aadfce 100644 --- a/core/tauri-runtime-wry/Cargo.toml +++ b/core/tauri-runtime-wry/Cargo.toml @@ -36,7 +36,7 @@ percent-encoding = "2.1" cocoa = "0.24" [target."cfg(target_os = \"android\")".dependencies] -jni = "0.20" +jni = "0.21" [features] dox = [ "wry/dox" ] diff --git a/core/tauri-runtime/Cargo.toml b/core/tauri-runtime/Cargo.toml index ca1cd004967a..3b0bf9125400 100644 --- a/core/tauri-runtime/Cargo.toml +++ b/core/tauri-runtime/Cargo.toml @@ -42,7 +42,7 @@ features = [ "Win32_Foundation" ] gtk = { version = "0.16", features = [ "v3_24" ] } [target."cfg(target_os = \"android\")".dependencies] -jni = "0.20" +jni = "0.21" [target."cfg(target_os = \"macos\")".dependencies] url = "2" diff --git a/core/tauri/src/jni_helpers.rs b/core/tauri/src/jni_helpers.rs index e6edb281077d..0d86e95c8310 100644 --- a/core/tauri/src/jni_helpers.rs +++ b/core/tauri/src/jni_helpers.rs @@ -16,7 +16,7 @@ fn json_to_java<'a, R: Runtime>( activity: JObject<'a>, runtime_handle: &R::Handle, json: &JsonValue, -) -> Result<(&'static str, JValue<'a>), JniError> { +) -> Result<(&'static str, JValue<'a, 'a>), JniError> { let (class, v) = match json { JsonValue::Null => ("Ljava/lang/Object;", JObject::null().into()), JsonValue::Bool(val) => ("Z", (*val).into()), @@ -75,7 +75,7 @@ pub fn to_jsobject<'a, R: Runtime>( activity: JObject<'a>, runtime_handle: &R::Handle, json: &JsonValue, -) -> Result, JniError> { +) -> Result, JniError> { if let JsonValue::Object(_) = json { json_to_java::(env, activity, runtime_handle, json).map(|(_class, data)| data) } else { diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index e09a3a5e7564..00588d87ccd7 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -3525,7 +3525,7 @@ dependencies = [ "gtk", "http", "http-range", - "jni 0.20.0", + "jni 0.21.1", "rand 0.8.5", "raw-window-handle", "serde", @@ -3543,7 +3543,7 @@ version = "0.13.0-alpha.6" dependencies = [ "cocoa 0.24.1", "gtk", - "jni 0.20.0", + "jni 0.21.1", "percent-encoding", "rand 0.8.5", "raw-window-handle", diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 4b3fba4c355b..be444615a5e3 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -299,9 +299,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.1" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] name = "bitness" @@ -1105,12 +1105,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "fdeflate" @@ -1759,15 +1756,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -1793,7 +1781,7 @@ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix", + "rustix 0.37.19", "windows-sys 0.48.0", ] @@ -2085,9 +2073,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libflate" @@ -2138,6 +2126,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "local-ip-address" version = "0.4.9" @@ -2314,7 +2308,7 @@ version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ede2d12cd6fce44da537a4be1f5510c73be2506c2e32dfaaafd1f36968f3a0e" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.3.3", "ctor 0.2.0", "napi-derive", "napi-sys", @@ -3261,7 +3255,20 @@ dependencies = [ "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "172891ebdceb05aa0005f533a6cbfca599ddd7d966f6f5d4d9b2e70478e70399" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.5", "windows-sys 0.48.0", ] @@ -4142,15 +4149,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.6.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" dependencies = [ - "autocfg", "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix", + "rustix 0.38.7", "windows-sys 0.48.0", ] From 893b5013a255d1837bf65e2ba292d12293818654 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sun, 13 Aug 2023 22:32:52 -0300 Subject: [PATCH 5/5] fix cli --- tooling/cli/src/interface/rust/manifest.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tooling/cli/src/interface/rust/manifest.rs b/tooling/cli/src/interface/rust/manifest.rs index 0a3a21003d15..f4d2c92c44d1 100644 --- a/tooling/cli/src/interface/rust/manifest.rs +++ b/tooling/cli/src/interface/rust/manifest.rs @@ -289,7 +289,10 @@ pub fn rewrite_manifest(config: &Config) -> crate::Result { dependencies.push(DependencyAllowlist { name: "tauri".into(), kind: DependencyKind::Normal, - all_cli_managed_features: crate::helpers::config::TauriConfig::all_features(), + all_cli_managed_features: crate::helpers::config::TauriConfig::all_features() + .into_iter() + .filter(|f| f != &"tray-icon") + .collect(), features: tauri_features, });