Skip to content

Finalize only the selected app#2659

Merged
freakboy3742 merged 10 commits intobeeware:mainfrom
moondial-pal:finalized-change
Feb 11, 2026
Merged

Finalize only the selected app#2659
freakboy3742 merged 10 commits intobeeware:mainfrom
moondial-pal:finalized-change

Conversation

@moondial-pal
Copy link
Contributor

When using the -a/--app options, Briefcase no longer finalizes all apps in a project.

This ensures that only the selected app is finalized, preventing configuration errors from unrelated apps.

Fixes #2654

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

At a high level, this is doing the right thing. A couple of comments inline about the specific changes you've made - most notably, deleting previously existing documentation. Unless existing documentation is fundamentally wrong or misleading, you should be very hesitant to delete existing comments.

Also - this change can be applied more broadly than just the create command. The changes you've made for change look good; but every command will be invoking finalize(), and will need comparable changes.

Comment on lines +692 to +693
from collections.abc import Iterable

Copy link
Member

Choose a reason for hiding this comment

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

This import definitely shouldn't be here - and it's redundant anyway because it's at the top of the file.

Suggested change
from collections.abc import Iterable

def finalize(
self,
app: AppConfig | None = None,
apps: AppConfig | Iterable[AppConfig] | None = None,
Copy link
Member

Choose a reason for hiding this comment

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

We should be able to exclude None and a bare AppConfig from this list by changing the places where it is used.

:param debugger_host: The host to use for the debugger
:param debugger_port: The port to use for the debugger
"""
"""Finalize Briefcase configuration."""
Copy link
Member

Choose a reason for hiding this comment

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

Why have you deleted this docstring? It definitely needs to be updated, but the content is still useful.


if app.external_package_path:
# Package path is defined
if app.sources is not None:
Copy link
Member

Choose a reason for hiding this comment

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

Why have you deleted these docstrings? They're still accurate and helpful.

@mhsmith mhsmith changed the title Finalized change Finalize only the selected app Feb 2, 2026
@moondial-pal
Copy link
Contributor Author

I’ve applied the finalize(apps=…) change consistently across all commands that invoke finalize().

All tests pass, and I’ve manually verified behavior with multiple apps in a local project (default invocation and -a / --app cases).

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Looks almost perfect - I picked up one small edge that looks incorrect.

("verify-tools",),
# App config has been finalized
("finalize-app-config", "first"),
("finalize-app-config", "second"),
Copy link
Member

Choose a reason for hiding this comment

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

This is likely the side effect of the change flagged in the package command. This test is explicitly packaging a single app; only one app should be finalized.

moondial-pal and others added 2 commits February 5, 2026 13:17
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
@freakboy3742
Copy link
Member

The correction you've applied looks right... but it's had a bunch of consequences in the test suite that need to be addressed.

@moondial-pal
Copy link
Contributor Author

Got it I'll work on that.

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Thanks for those fixes!

@freakboy3742 freakboy3742 merged commit 43251df into beeware:main Feb 11, 2026
58 checks passed
@moondial-pal moondial-pal deleted the finalized-change branch February 11, 2026 23:44
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.

Apps are finalized when they don't have to be=

2 participants