flet build --clear-cache flag deprecated
This guide is accurate as of Flet 0.86.0. Later releases might add new APIs or additional migration paths.
The breaking changes and deprecations index lists the guides created for each release.
Summary
Flet 0.86.0 deprecated the --clear-cache flag of
flet build and flet debug.
Use the new flet clean command instead.
Context
--clear-cache only deleted the Flutter bootstrap project (build/flutter),
and only when the build template hash had changed — so it was a no-op in the
common case and never reset the rest of the build directory.
The new flet clean command deletes the entire
build directory (the Flutter bootstrap project, cached artifacts, hash stamps,
and generated output) unconditionally, giving a predictable, full reset before
the next build.
Migration guide
Before:
flet build web --clear-cache
After:
flet clean
flet build web
flet clean accepts an optional path to the app directory (defaults to the
current directory), so you can target another project with flet clean path/to/app.
Timeline
- Deprecated in:
0.86.0 - Removal in:
0.89.0
References
- CLI documentation:
flet clean,flet build - Issues and PRs: #6233
- Release notes: Flet 0.86.0