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.
This commit is contained in:
Huang Xin 2026-08-11 08:43:06 +08:00 committed by GitHub
parent d843df6b68
commit ca5acd0399
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

2
Cargo.lock generated
View file

@ -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",

View file

@ -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"