Skip to content

Stop splitting exclude and cleanup globs on commas; prepare 5.0.0 - #253

Merged
FeodorFitsner merged 2 commits into
mainfrom
no-comma-split-exclude-cleanup
Sep 26, 2026
Merged

FeodorFitsner merged 2 commits into
mainfrom
no-comma-split-exclude-cleanup

Conversation

@FeodorFitsner

Copy link
Copy Markdown
Contributor

Needed for flet-dev/flet#6890 (flet-dev/flet#6839).

Problem

--exclude, --cleanup-app-files and --cleanup-package-files are declared with the args default splitCommas: true, so every value is split on commas, even when the option is repeated:

  • A path containing a comma breaks apart. Flet is about to exclude hidden files it discovers automatically, and a hidden file named .a,main.py would become the exclusions .a and main.py, dropping the app's entry point.
  • Brace globs don't work: --cleanup-package-files '**/{tests,docs}' becomes the two broken globs **/{tests and docs}.

Change

  • splitCommas: false on exclude, cleanup-app-files and cleanup-package-files, matching requirements. Help texts now say each option can be used multiple times.
  • arch keeps splitting: its values are fixed ABI names, and Flet passes them comma-joined.
  • README: new "Excluding and cleaning up files" section. It also corrects "honoring --exclude globs", since excludes are exact paths.
  • All six packages are bumped to 5.0.0, with changelogs, the podspec, the Gradle version and the example lockfiles updated.

Why a major version

This changes the package CLI contract, and the breakage is silent: --exclude build,tests is now one path, so nothing is excluded and there's no error. The Dart API and runtime are unchanged. flet build pins serious_python exactly (serious_python: 4.7.1 in its template), so existing Flet releases are unaffected. Flet switches to repeated flags together with the 5.0.0 pin.

Testing

  • dart analyze bin: no issues. package --help shows the new help texts.
  • package app -p Emscripten --exclude ".a,main.py" --exclude build --cleanup-app --cleanup-app-files '**/{tests,docs}' on a test app: app.zip contains only main.py and pkg/keep.txt. So .a,main.py and build/ were excluded, main.py was kept, and both tests/ and docs/ were cleaned.

--exclude, --cleanup-app-files and --cleanup-package-files used the
args package default splitCommas: true, so a path containing a comma
became several exclusions and brace globs like **/{tests,docs} were
split into broken halves. Disable comma splitting for the three
options, like --requirements, and pass each value as its own option.

This changes the package command's CLI contract (a comma-separated
value is now one path), so bump all packages to 5.0.0 and document
exclude/cleanup options in the README.

Refs flet-dev/flet#6839
@FeodorFitsner
FeodorFitsner merged commit 16bceeb into main Sep 26, 2026
29 of 31 checks passed
@FeodorFitsner
FeodorFitsner deleted the no-comma-split-exclude-cleanup branch September 26, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant