Skip to content

Prepare 0.86.2 release: fix stale code under flet debug android (serious_python 4.3.4)#6690

Open
FeodorFitsner wants to merge 1 commit into
mainfrom
flet-0.86.2
Open

Prepare 0.86.2 release: fix stale code under flet debug android (serious_python 4.3.4)#6690
FeodorFitsner wants to merge 1 commit into
mainfrom
flet-0.86.2

Conversation

@FeodorFitsner

@FeodorFitsner FeodorFitsner commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #6682 — code edits not taking effect under flet debug android.

flet debug android re-packages the app, rebuilds the APK, and flutter run -d <device> reinstalls it, so the new code is in the freshly installed APK's assets. But on Android, serious_python copies the app payload out of the APK to a writable dir only when its cache key changes, and that key was versionName+versionCode. flet debug never bumps the version between iterations, and flutter run does an update install that preserves app data (including the cache marker), so the key never changed → re-extraction was skipped → the app kept running stale code.

flet build apk was never affected (fresh/version-bumped install), which matched the reporter's observation. iOS/desktop are also unaffected — they run the app straight from the read-only app bundle, which flutter run fully replaces each reinstall.

Change

Bump the flet build template's serious_python pin 4.3.3 → 4.3.4. serious_python 4.3.4 folds the APK's PackageManager.lastUpdateTime into the extraction cache key, so every (re)install re-extracts the current code while ordinary relaunches still hit the cache.

Files, mirroring the 0.86.1 release-prep convention:

  • sdk/python/templates/build/.../pubspec.yaml — pin bump.
  • CHANGELOG.md## 0.86.2 bug-fix entry.
  • packages/flet/CHANGELOG.md + packages/flet/pubspec.yaml — Dart package version bumped for release coordination (no code change).

⚠️ Merge/release ordering

This depends on serious_python 4.3.4, which is prepared in flet-dev/serious-python#235 but not yet published to pub.dev. Do not merge/release this until 4.3.4 is live on pub.dev, or flet build will fail to resolve the pin.

Verification

Not exercised on a device here. End-to-end check once 4.3.4 is published: flet debug android → confirm app shows → edit main.pyflet debug android again → confirm the edit now appears (previously it wouldn't).

Summary by Sourcery

Prepare the 0.86.2 release to fix stale code when using flet debug android by updating the serious_python dependency and coordinating package versions.

Bug Fixes:

  • Ensure code changes take effect under flet debug android by relying on serious_python 4.3.4’s improved on-device extraction cache behavior.

Enhancements:

  • Bump the serious_python dependency from 4.3.3 to 4.3.4 in the Python build template to align with the new caching strategy.

Documentation:

  • Add a 0.86.2 entry to the main CHANGELOG documenting the Android debug stale-code fix.

Chores:

  • Bump the flet Dart package version to 0.86.2 for release coordination, without changing its code.

…rious_python 4.3.4)

`flet debug android` kept running previously-unpacked, stale app code after a
re-run. `flet debug` reinstalls the same-version APK on each iteration
(`flutter run` does an update install that preserves app data), and
serious_python's on-device extraction cache — keyed only on
`versionName+versionCode` — never saw the version change, so it skipped
re-unpacking the new `app.zip`.

Bump the build template's serious_python pin to 4.3.4, which folds the APK's
`lastUpdateTime` into the cache key so every (re)install re-extracts the
current code. `flet build apk` was never affected.

Fixes #6682

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying flet-website-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 438e5e8
Status: ✅  Deploy successful!
Preview URL: https://14a95f9e.flet-website-v2.pages.dev
Branch Preview URL: https://flet-0-86-2.flet-website-v2.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant