@ondeinference / onde / commits / c0364f0

Fix the Kotlin and Dart release jobs

Both broke on the 1.2.3 tag for reasons unrelated to the release itself. Kotlin: dtolnay/rust-toolchain@stable installed stable and added the four Android targets to it, but bare cargo in this repo resolves to the 1.94.0 pin in rust-toolchain.toml, which has no Android std — so building the .so files died on "can't find crate for `core`". ci.yml and the Swift and Rust release workflows already read the channel out of rust-toolchain.toml and feed it to the action; this does the same. Dart: flutter pub get on 3.44+ rewrites analysis_options.yaml for the package and the example to exclude build and platform directories, so pub publish --dry-run saw two modified checked-in files, warned, and exited 65. The publish job already restores the tree after pub get for the same reason with the plugin registrants; validate now does too. Co-Authored-By: siGit Code v1.5.6 <noreply@sigit.si>

Seto Elkahfi committed Sep 5, 2026 at 12:41 UTC c0364f08697b087770cb6d0c79c1fd12011f91f4
2 files changed +25
.github/workflows/release-sdk-dart.yml
+10
@@ -73,6 +73,16 @@ jobs:
73 working-directory: sdk/dart
74 run: flutter pub get
75
76 + # flutter pub get rewrites tracked files: platform plugin registrants, and
77 + # since Flutter 3.44 the analysis_options.yaml of the package and its
78 + # example ("Upgrading analysis_options.yaml to exclude build and platform
79 + # directories"). pub publish treats a dirty tree as a warning and exits 65,
80 + # which is what failed the 1.2.3 release. Restore to HEAD, same as the
81 + # publish job below.
82 + - name: Restore generated files modified by flutter pub get
83 + working-directory: sdk/dart
84 + run: git checkout -- . 2>/dev/null || true
85 +
86 - name: Analyze
87 working-directory: sdk/dart
88 # --no-fatal-infos: flutter_rust_bridge codegen files emit infos that
.github/workflows/release-sdk-kotlin.yml
+15
@@ -53,9 +53,24 @@ jobs:
53 build-root-directory: sdk/kotlin
54
55 # ── Rust ──────────────────────────────────────────────────────────────────
56 + # Read the channel from rust-toolchain.toml so it is pinned in exactly one
57 + # place. Without `toolchain:` the action installs plain stable and adds the
58 + # Android targets to *that*, while bare `cargo` in this repo resolves to the
59 + # pinned channel — a different toolchain with no Android std, which is why
60 + # the 1.2.3 release failed on "can't find crate for `core`".
61 + - name: Read Rust toolchain
62 + run: |
63 + rust_toolchain="$(sed -n 's/^channel = "\(.*\)"/\1/p' rust-toolchain.toml | head -n 1)"
64 + if [ -z "$rust_toolchain" ]; then
65 + echo "::error::Failed to read channel from rust-toolchain.toml"
66 + exit 1
67 + fi
68 + echo "RUST_TOOLCHAIN=${rust_toolchain}" >> "$GITHUB_ENV"
69 +
70 - name: Install stable Rust toolchain
71 uses: dtolnay/rust-toolchain@stable
72 with:
73 + toolchain: ${{ env.RUST_TOOLCHAIN }}
74 targets: >-
75 aarch64-linux-android,
76 armv7-linux-androideabi,