From ca5acd0399154392b8dc5aa45266ccad0472b69a Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Tue, 11 Aug 2026 08:43:06 +0800 Subject: [PATCH] fix(ci): stop cargo pulling the flutter SDK for the localsend dep (#5622) Nightly failed on both Windows arches while checking out the localsend git dependency: path too long: 'C:/Users/runneradmin/.cargo/git/checkouts/ localsend-347f023daa6e6a88/ff2995c/support/submodules/flutter/dev/ integration_tests/android_engine_test/android/app/src/main/kotlin/ com/example/native_driver_test/fixtures/ BlueOrangeGradientSurfaceViewPlatformViewFactory.kt'; class=Filesystem (30) Cargo recursively initializes and updates every submodule declared by a git dependency. It cannot fetch only packages/core, so upstream's single .gitmodules entry drags in the whole Flutter SDK: 552 MB checked out, and on Windows those Flutter paths exceed MAX_PATH so the checkout fails. macOS, Linux and Android passed only because they have no path limit; they still paid the download. Cargo does honor a submodule update strategy of "none", so source the crate from readest/localsend instead. That fork's only delta against the pinned upstream rev is one line adding "update = none" to the flutter submodule; packages/core is byte for byte identical, so the compiled crate does not change. Cargo now reports: Skipping git submodule `https://github.com/flutter/flutter.git` due to update strategy in .gitmodules and the checkout drops from 552 MB to 39 MB on every platform. When bumping localsend, rebase that one commit onto the new upstream rev in the fork and re-pin here; pointing back at localsend/localsend brings the Windows failure back. --- Cargo.lock | 2 +- apps/readest-app/src-tauri/Cargo.toml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e6fa3e7ad..b775c00a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4239,7 +4239,7 @@ dependencies = [ [[package]] name = "localsend" version = "0.1.0" -source = "git+https://github.com/localsend/localsend?rev=ff2995c9523c5fae407f7d444d0986b2c6ae568e#ff2995c9523c5fae407f7d444d0986b2c6ae568e" +source = "git+https://github.com/readest/localsend?rev=8802cb037fc38a92bc932681d18e7a79e813b688#8802cb037fc38a92bc932681d18e7a79e813b688" dependencies = [ "anyhow", "base64 0.23.1", diff --git a/apps/readest-app/src-tauri/Cargo.toml b/apps/readest-app/src-tauri/Cargo.toml index d7f384eea..9fbdc0825 100644 --- a/apps/readest-app/src-tauri/Cargo.toml +++ b/apps/readest-app/src-tauri/Cargo.toml @@ -78,7 +78,13 @@ tauri-plugin-webdriver = { version = "0.2", optional = true } # LocalSend protocol v2.2 (discovery + HTTPS transfer). Upstream's own # protocol core, pinned by rev; `discovery` pulls `http`+`crypto`+`multicast`, # WebRTC/v3 stays off. -localsend = { git = "https://github.com/localsend/localsend", rev = "ff2995c9523c5fae407f7d444d0986b2c6ae568e", default-features = false, features = ["discovery"] } +# +# Sourced from our fork, which only adds `update = none` to upstream's flutter +# submodule. Cargo updates every submodule of a git dependency, so upstream +# pulls the whole Flutter SDK (552 MB checked out) and blows past MAX_PATH on +# Windows. The fork's `readest` branch tracks the same upstream rev +# (ff2995c9523c5fae407f7d444d0986b2c6ae568e); rebase it when bumping. +localsend = { git = "https://github.com/readest/localsend", rev = "8802cb037fc38a92bc932681d18e7a79e813b688", default-features = false, features = ["discovery"] } uuid = { version = "1", features = ["v4"] } pem = "4" anyhow = "1"