Repository navigation
fix(flet build): honor empty platform values for remaining build settings - #7040
Open
AbhayPhalswal wants to merge 3 commits into
Open
AbhayPhalswal wants to merge 3 commits into
AbhayPhalswal wants to merge 3 commits into
Conversation
`artifact`, `org`, `bundle_id`, `icon_background` and the `splash` settings resolved `[tool.flet.<platform>]` over `[tool.flet]` with `or`, so an explicit empty platform value was skipped and the global value won. They now go through `get_platform_setting()`, which already treats any set value as an override, so an empty platform value clears the global one and the caller's default applies. `get_platform_setting()` gains an optional `platform` argument so `icon_background_value()` can resolve Android's adaptive-icon colour while another platform is being built. Covers the keys from flet-dev#6949 that flet-dev#6981 did not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t empty overrides
ndonkoHenri
approved these changes
Nov 2, 2026
flet build): honor empty platform values for remaining build settings
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #6981 for the rest of #6949.
flet buildresolved these[tool.flet.<platform>]settings asplatform_value or global_value, so an explicit empty platform value was skipped and the global value won:artifactorgbundle_idicon_background(icon_background_value())splash.*viasplash_setting():color,dark_color,icon_background,icon_dark_background,icon_fitThey now resolve through
get_platform_setting(), which already has the "present wins" (is not None) semantics the issue proposes, so the precedence rule lives in one place. An empty platform value clears the global value for that platform, and the caller's existing default applies:com.flet,<org>.<project>, the default artifact name, a white icon background, the default splash colours andcontain. None of these settings can end up as an empty string.get_platform_setting()gets an optionalplatformargument, soicon_background_value("android")keeps working while another platform is being built.Tests
New cases in
test_build_platform_settings.pycover:platformargumentThe
artifact,organdbundle_idcall sites insetup_template_data()now useget_platform_setting(), whichtest_empty_platform_value_clears_globalalready covers. There's no existing test harness forsetup_template_data(), so I didn't add one. I'm happy to if you'd like.Locally on Windows,
uv run --group test pytest packages/flet-cli/testsgives 855 passed, 12 skipped and 2 failed. Both failures (test_unreadable_source_warns_without_failingandtest_warns_when_listed_file_is_missing) fail the same way on the base commit, so they're Windows-specific and unrelated to this change.ruff format --checkandruff checkpass on the changed files.Not included: documenting the precedence rules on the publish docs page, which the issue also suggests.
🤖 Generated with Claude Code
Summary by Sourcery
Honor explicit empty platform values across remaining build settings so they override global configuration consistently and fall back to platform defaults when appropriate.
Bug Fixes:
Enhancements:
Documentation:
Tests: