Skip to content

Prepare 4.7.2 release and fix packaging failure exit status - #252

Merged
FeodorFitsner merged 5 commits into
mainfrom
fix/package-exit-status
Sep 24, 2026
Merged

FeodorFitsner merged 5 commits into
mainfrom
fix/package-exit-status

Conversation

@ndonkoHenri

@ndonkoHenri ndonkoHenri commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Packaging exceptions currently print an error but leave the command's exit status at 0. CI and flet build can therefore continue after failed packaging; flet build may also cache the failed step as complete. Write these errors to stderr and set dart:io's exitCode = 1, allowing the existing finally cleanup to run.

This PR also prepares all six packages for the 4.7.2 release:

Validation with Flutter 3.44.8:

  • flutter test --no-pub test: passed.
  • dart analyze bin: no issues.
  • All six package versions/changelogs, both native versions, and all three example lockfiles verified.
  • Darwin podspec Ruby syntax and git diff --check: passed.
  • Packaging smoke checks during review: missing SERIOUS_PYTHON_APP exits 1 with stderr output and temporary-directory cleanup; successful native staging exits 0 and cleans up.

Full platform integration coverage runs in CI. Existing explicit exit(1)/exit(2) paths are unchanged. No release tag or publication is part of this PR.

The package command caught every exception, printed "Error: ..." to
stdout and returned normally, so the process exited 0. Callers could not
tell a failed run from a successful one: CI moved on to the integration
tests, and flet build continued past the failed step, committed its
package hash (so the next build passes --skip-site-packages) and, outside
verbose mode, never showed the captured message.

The catch writes the error to stderr and sets exitCode = 1. It uses
exitCode rather than exit() so the finally block still removes the
temporary directory and stops the Pyodide PyPI server. The early exit(1)
and exit(2) paths are unchanged.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The reviewed changes correctly report packaging failures, with no unresolved issues.

Review effort: Balanced
Findings: None

What changed in this PR

Ensures packaging exceptions return a non-zero status while preserving cleanup behavior.

Changes:

  • Writes caught packaging errors to stderr and sets exitCode = 1.
  • Documents the fix in the 4.7.2 changelog.
File Description
src/​serious_python/​CHANGELOG.md Adds the 4.7.2 release note.
src/​serious_python/​bin/​package_command.dart Reports caught packaging failures with status 1 while preserving cleanup.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@FeodorFitsner FeodorFitsner changed the title fix(package): exit with status 1 when packaging fails Prepare 4.7.2 release and fix packaging failure exit status Sep 24, 2026
@FeodorFitsner
FeodorFitsner merged commit bd5fef7 into main Sep 24, 2026
5 of 54 checks passed
@FeodorFitsner
FeodorFitsner deleted the fix/package-exit-status branch September 24, 2026 23:33
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.

3 participants