From 5e7ebbc1000ce96671c2d50d3f6d5e0cbb9de271 Mon Sep 17 00:00:00 2001 From: Jai A Date: Mon, 9 Sep 2024 21:25:22 -0700 Subject: [PATCH] Bump tauri version --- .github/workflows/app-release.yml | 2 +- .github/workflows/ci.yml | 2 +- Cargo.lock | 26 ++++++++++++------------- Cargo.toml | 2 +- apps/app/Cargo.toml | 4 ++-- apps/app/README.md | 2 +- packages/app-lib/Cargo.toml | 2 +- packages/app-lib/src/api/profile/mod.rs | 7 +------ packages/app-lib/src/state/cache.rs | 3 +-- packages/app-lib/src/state/profiles.rs | 14 ++++++------- packages/app-lib/src/util/platform.rs | 4 ++-- 11 files changed, 31 insertions(+), 37 deletions(-) diff --git a/.github/workflows/app-release.yml b/.github/workflows/app-release.yml index 5526ca787..6d87d73ee 100644 --- a/.github/workflows/app-release.yml +++ b/.github/workflows/app-release.yml @@ -42,7 +42,7 @@ jobs: components: rustfmt, clippy - name: Install Tauri CLI - run: cargo install tauri-cli --git https://github.com/modrinth/tauri.git --rev 5b26cbff93fe4697338e56dfc7299ac8864b3445 + run: cargo install tauri-cli --git https://github.com/modrinth/tauri.git --rev 5e2942876c2266594ed1db516c1d9975c873c36a - name: Setup rust cache uses: actions/cache@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dac31ac21..c87726f89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf - name: Install Tauri CLI - run: cargo install tauri-cli --git https://github.com/modrinth/tauri.git --rev 5b26cbff93fe4697338e56dfc7299ac8864b3445 + run: cargo install tauri-cli --git https://github.com/modrinth/tauri.git --rev 5e2942876c2266594ed1db516c1d9975c873c36a - name: Setup Node.JS environment uses: actions/setup-node@v4 diff --git a/Cargo.lock b/Cargo.lock index 6a01b0d2a..4c982fb55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5259,7 +5259,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" version = "2.0.0-rc.10" -source = "git+https://github.com/modrinth/tauri?rev=5b26cbf#5b26cbff93fe4697338e56dfc7299ac8864b3445" +source = "git+https://github.com/modrinth/tauri?rev=5e29428#5e2942876c2266594ed1db516c1d9975c873c36a" dependencies = [ "anyhow", "bytes", @@ -5293,7 +5293,7 @@ dependencies = [ "tauri-macros", "tauri-runtime", "tauri-runtime-wry", - "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5b26cbf)", + "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5e29428)", "thiserror", "tokio", "tray-icon", @@ -5308,7 +5308,7 @@ dependencies = [ [[package]] name = "tauri-build" version = "2.0.0-rc.9" -source = "git+https://github.com/modrinth/tauri?rev=5b26cbf#5b26cbff93fe4697338e56dfc7299ac8864b3445" +source = "git+https://github.com/modrinth/tauri?rev=5e29428#5e2942876c2266594ed1db516c1d9975c873c36a" dependencies = [ "anyhow", "cargo_toml", @@ -5322,7 +5322,7 @@ dependencies = [ "serde", "serde_json", "tauri-codegen", - "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5b26cbf)", + "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5e29428)", "tauri-winres", "toml 0.8.19", "walkdir", @@ -5331,7 +5331,7 @@ dependencies = [ [[package]] name = "tauri-codegen" version = "2.0.0-rc.9" -source = "git+https://github.com/modrinth/tauri?rev=5b26cbf#5b26cbff93fe4697338e56dfc7299ac8864b3445" +source = "git+https://github.com/modrinth/tauri?rev=5e29428#5e2942876c2266594ed1db516c1d9975c873c36a" dependencies = [ "base64 0.22.1", "brotli", @@ -5346,7 +5346,7 @@ dependencies = [ "serde_json", "sha2", "syn 2.0.77", - "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5b26cbf)", + "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5e29428)", "thiserror", "time", "url", @@ -5357,14 +5357,14 @@ dependencies = [ [[package]] name = "tauri-macros" version = "2.0.0-rc.8" -source = "git+https://github.com/modrinth/tauri?rev=5b26cbf#5b26cbff93fe4697338e56dfc7299ac8864b3445" +source = "git+https://github.com/modrinth/tauri?rev=5e29428#5e2942876c2266594ed1db516c1d9975c873c36a" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.77", "tauri-codegen", - "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5b26cbf)", + "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5e29428)", ] [[package]] @@ -5543,7 +5543,7 @@ dependencies = [ [[package]] name = "tauri-runtime" version = "2.0.0-rc.9" -source = "git+https://github.com/modrinth/tauri?rev=5b26cbf#5b26cbff93fe4697338e56dfc7299ac8864b3445" +source = "git+https://github.com/modrinth/tauri?rev=5e29428#5e2942876c2266594ed1db516c1d9975c873c36a" dependencies = [ "dpi", "gtk", @@ -5552,7 +5552,7 @@ dependencies = [ "raw-window-handle 0.6.2", "serde", "serde_json", - "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5b26cbf)", + "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5e29428)", "thiserror", "url", "windows 0.58.0", @@ -5561,7 +5561,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" version = "2.0.0-rc.9" -source = "git+https://github.com/modrinth/tauri?rev=5b26cbf#5b26cbff93fe4697338e56dfc7299ac8864b3445" +source = "git+https://github.com/modrinth/tauri?rev=5e29428#5e2942876c2266594ed1db516c1d9975c873c36a" dependencies = [ "cocoa 0.26.0", "gtk", @@ -5573,7 +5573,7 @@ dependencies = [ "softbuffer", "tao", "tauri-runtime", - "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5b26cbf)", + "tauri-utils 2.0.0-rc.9 (git+https://github.com/modrinth/tauri?rev=5e29428)", "url", "webkit2gtk", "webview2-com", @@ -5617,7 +5617,7 @@ dependencies = [ [[package]] name = "tauri-utils" version = "2.0.0-rc.9" -source = "git+https://github.com/modrinth/tauri?rev=5b26cbf#5b26cbff93fe4697338e56dfc7299ac8864b3445" +source = "git+https://github.com/modrinth/tauri?rev=5e29428#5e2942876c2266594ed1db516c1d9975c873c36a" dependencies = [ "brotli", "cargo_metadata", diff --git a/Cargo.toml b/Cargo.toml index 944016de2..904e7b2c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,4 +19,4 @@ opt-level = 3 [patch.crates-io] wry = { git = "https://github.com/modrinth/wry", rev = "5840108" } -tauri = { git = "https://github.com/modrinth/tauri", rev = "5b26cbf" } \ No newline at end of file +tauri = { git = "https://github.com/modrinth/tauri", rev = "5e29428" } \ No newline at end of file diff --git a/apps/app/Cargo.toml b/apps/app/Cargo.toml index bf29700c4..8e7fc2616 100644 --- a/apps/app/Cargo.toml +++ b/apps/app/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" build = "build.rs" [build-dependencies] -tauri-build = { git = "https://github.com/modrinth/tauri", features = ["codegen"], rev = "5b26cbf" } +tauri-build = { git = "https://github.com/modrinth/tauri", features = ["codegen"], rev = "5e29428" } [dependencies] theseus = { path = "../../packages/app-lib", features = ["tauri"] } @@ -16,7 +16,7 @@ theseus = { path = "../../packages/app-lib", features = ["tauri"] } serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { git = "https://github.com/modrinth/tauri", features = ["devtools", "macos-private-api", "protocol-asset", "unstable"], rev = "5b26cbf" } +tauri = { git = "https://github.com/modrinth/tauri", features = ["devtools", "macos-private-api", "protocol-asset", "unstable"], rev = "5e29428" } tauri-plugin-window-state = "2.0.0-rc" tauri-plugin-deep-link = "2.0.0-rc" tauri-plugin-os = "2.0.0-rc" diff --git a/apps/app/README.md b/apps/app/README.md index ce884ebb8..39d4ae582 100644 --- a/apps/app/README.md +++ b/apps/app/README.md @@ -22,7 +22,7 @@ Before you begin, ensure you have the following installed on your machine: Follow these steps to set up your development environment: ```bash -cargo install tauri-cli --git https://github.com/modrinth/tauri.git --rev 5b26cbff93fe4697338e56dfc7299ac8864b3445 +cargo install tauri-cli --git https://github.com/modrinth/tauri.git --rev 5e2942876c2266594ed1db516c1d9975c873c36a pnpm install pnpm app:dev ``` diff --git a/packages/app-lib/Cargo.toml b/packages/app-lib/Cargo.toml index 67cd959d2..68d35e28e 100644 --- a/packages/app-lib/Cargo.toml +++ b/packages/app-lib/Cargo.toml @@ -36,7 +36,7 @@ tracing-error = "0.2.0" paste = { version = "1.0" } -tauri = { git = "https://github.com/modrinth/tauri", rev = "5b26cbf", optional = true } +tauri = { git = "https://github.com/modrinth/tauri", rev = "5e29428", optional = true } indicatif = { version = "0.17.3", optional = true } async-tungstenite = { version = "0.27.0", features = ["tokio-runtime", "tokio-rustls-webpki-roots"] } diff --git a/packages/app-lib/src/api/profile/mod.rs b/packages/app-lib/src/api/profile/mod.rs index aaa2864a1..71da54d38 100644 --- a/packages/app-lib/src/api/profile/mod.rs +++ b/packages/app-lib/src/api/profile/mod.rs @@ -40,15 +40,10 @@ pub mod update; #[tracing::instrument] pub async fn remove(path: &str) -> crate::Result<()> { let state = State::get().await?; - - let mut transaction = state.pool.begin().await?; - - Profile::remove(path, &mut transaction).await?; + Profile::remove(path, &state.pool).await?; emit_profile(path, ProfilePayloadType::Removed).await?; - transaction.commit().await?; - Ok(()) } diff --git a/packages/app-lib/src/state/cache.rs b/packages/app-lib/src/state/cache.rs index 73e9dcc56..12b7cd896 100644 --- a/packages/app-lib/src/state/cache.rs +++ b/packages/app-lib/src/state/cache.rs @@ -738,8 +738,7 @@ impl CachedEntry { .unwrap_or(false) }); - if let Some(data) = parsed_data - { + if let Some(data) = parsed_data { return_vals.push(Self { id: row.id, alias: row.alias, diff --git a/packages/app-lib/src/state/profiles.rs b/packages/app-lib/src/state/profiles.rs index 690edf7b1..802cc75e8 100644 --- a/packages/app-lib/src/state/profiles.rs +++ b/packages/app-lib/src/state/profiles.rs @@ -501,13 +501,8 @@ impl Profile { pub async fn remove( profile_path: &str, - transaction: &mut sqlx::Transaction<'_, sqlx::Sqlite>, + pool: &SqlitePool, ) -> crate::Result<()> { - if let Ok(path) = crate::api::profile::get_full_path(profile_path).await - { - io::remove_dir_all(&path).await?; - } - sqlx::query!( " DELETE FROM profiles @@ -515,9 +510,14 @@ impl Profile { ", profile_path ) - .execute(&mut **transaction) + .execute(pool) .await?; + if let Ok(path) = crate::api::profile::get_full_path(profile_path).await + { + io::remove_dir_all(&path).await?; + } + Ok(()) } diff --git a/packages/app-lib/src/util/platform.rs b/packages/app-lib/src/util/platform.rs index 668258174..fce5e12c5 100644 --- a/packages/app-lib/src/util/platform.rs +++ b/packages/app-lib/src/util/platform.rs @@ -85,8 +85,8 @@ pub fn os_rule( if minecraft_updated && (name != &Os::LinuxArm64 || name != &Os::LinuxArm32) { - rule_match &= - &Os::native() == &name.get_os() || &Os::native_arch(java_arch) == name; + rule_match &= &Os::native() == &name.get_os() + || &Os::native_arch(java_arch) == name; } else { rule_match &= &Os::native_arch(java_arch) == name; }