Skip to content

Commit cf53724

Browse files
fix: align Flutter sub-package runanywhere dep constraint with release version
CodeRabbit P-Major flagged (correct): the runanywhere_genie / llamacpp / onnx Flutter sub-packages were bumped to 0.19.12 but still declared `runanywhere: ^0.16.0` as their core dependency. pub would resolve the core as 0.16.0 from pub.dev — missing every API added since — making the newly-released backend packages unusable for consumers. Fix: - Update the three sub-packages' runanywhere caret constraint to ^0.19.0 (MAJOR.MINOR floor of the current release). - Teach sync-versions.sh to keep this constraint aligned with the release version automatically on future bumps, so this can't drift again. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cb681dd commit cf53724

4 files changed

Lines changed: 25 additions & 3 deletions

File tree

scripts/sync-versions.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@ bump_pubspec_version() {
7373
bump_line "$file" '^version: .+' "version: ${NEW_VERSION}"
7474
}
7575

76+
# Flutter sub-packages (genie/llamacpp/onnx) depend on the core `runanywhere`
77+
# package via a caret constraint like `runanywhere: ^0.19.0`. When we bump
78+
# the suite, that constraint must track the NEW_VERSION's MAJOR.MINOR floor
79+
# so the sub-packages pull a matching core, not an older published one.
80+
bump_pubspec_runanywhere_dep() {
81+
local file="$1"
82+
# Caret floor = current MAJOR.MINOR.0 (e.g. 0.19.12 → 0.19.0)
83+
local major_minor
84+
major_minor="$(echo "${NEW_VERSION}" | awk -F. '{print $1"."$2".0"}')"
85+
bump_line "$file" '^ runanywhere: \^[0-9]+\.[0-9]+\.[0-9]+' \
86+
" runanywhere: ^${major_minor}"
87+
}
88+
7689
echo ">> Syncing versions to ${NEW_VERSION}"
7790
echo ">> Repo root: ${REPO_ROOT}"
7891
echo ""
@@ -141,6 +154,15 @@ for pkg in \
141154
bump_pubspec_version "$pkg"
142155
done
143156

157+
# Sub-packages depend on the core `runanywhere` package; align their
158+
# dependency floor to match the bumped suite version.
159+
for pkg in \
160+
"${REPO_ROOT}/sdk/runanywhere-flutter/packages/runanywhere_genie/pubspec.yaml" \
161+
"${REPO_ROOT}/sdk/runanywhere-flutter/packages/runanywhere_llamacpp/pubspec.yaml" \
162+
"${REPO_ROOT}/sdk/runanywhere-flutter/packages/runanywhere_onnx/pubspec.yaml"; do
163+
bump_pubspec_runanywhere_dep "$pkg"
164+
done
165+
144166
echo ""
145167
echo ">> Done. Verify with:"
146168
echo " git diff -- sdk/ Package.swift"

sdk/runanywhere-flutter/packages/runanywhere_genie/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
flutter:
2020
sdk: flutter
2121
# Core SDK dependency (provides RACommons)
22-
runanywhere: ^0.16.0
22+
runanywhere: ^0.19.0
2323
ffi: ^2.1.0
2424

2525
dev_dependencies:

sdk/runanywhere-flutter/packages/runanywhere_llamacpp/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
flutter:
2020
sdk: flutter
2121
# Core SDK dependency (provides RACommons)
22-
runanywhere: ^0.16.0
22+
runanywhere: ^0.19.0
2323
ffi: ^2.1.0
2424

2525
dev_dependencies:

sdk/runanywhere-flutter/packages/runanywhere_onnx/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
flutter:
2020
sdk: flutter
2121
# Core SDK dependency (provides RACommons)
22-
runanywhere: ^0.16.0
22+
runanywhere: ^0.19.0
2323
ffi: ^2.1.0
2424
# HTTP for download strategy
2525
http: ^1.2.1

0 commit comments

Comments
 (0)