Skip to content

Show a failed command's output without --verbose; bump to 6.1.3 - #262

Merged
FeodorFitsner merged 3 commits into
mainfrom
fix/runexec-show-failed-output
Oct 31, 2026
Merged

FeodorFitsner merged 3 commits into
mainfrom
fix/runexec-show-failed-output

Conversation

@ndonkoHenri

Copy link
Copy Markdown
Collaborator

When a command run by package failed, serious_python printed only that command's stderr, and its stdout was shown only with --verbose. Some tools report errors on stdout: python -m compileall prints a file's SyntaxError there and leaves stderr empty. So when an app had a .py file that doesn't compile, flet build failed with "Error building Flet app - see the log of failed command above." and nothing above it, unless it ran with -vv, the only level at which it passes --verbose. Dependencies hadn't been installed yet at that point, which is what flet-dev/flet#7029 reported as an empty site-packages.

Change

runExec now keeps the command's stdout when --verbose is off. If the command fails, it writes that stdout to stderr, then the command's stderr, then flushes before exit(1), which doesn't wait for pending writes.

  • Successful commands: their output still isn't printed, so builds are as quiet as before.
  • --verbose: unchanged; stdout is still shown as it arrives.
  • The failing command line isn't printed: pip index URLs can carry credentials.

flet build already prints the package command's stderr when it fails, at every verbosity, so on the Flet side only the template's serious_python pin needs bumping.

Bumps every package to 6.1.3.

Testing

On macOS, dart run serious_python:main package on a Flet app whose helper.py contains def broken(::

  • Before (via flet build macos -v with flet 1.0.5 / serious_python 5.0.0): the log ends at the compileall line; no error is shown.
  • After, without --verbose: stderr shows the file, line 1 and SyntaxError: invalid syntax.
  • After, with --verbose: same output as before.
  • After, valid app: compileall and pip write nothing to stderr.
  • dart analyze bin reports no issues; dart format makes no changes.

Fixes flet-dev/flet#7029

runExec discarded the stdout of commands it ran unless --verbose was set, and printed only stderr when one failed. compileall reports a file's SyntaxError on stdout, so a syntax error in an app file made flet build fail with no explanation unless run with -vv (flet-dev/flet#7029).
@FeodorFitsner
FeodorFitsner merged commit ee4f2cf into main Oct 31, 2026
27 of 54 checks passed
@FeodorFitsner
FeodorFitsner deleted the fix/runexec-show-failed-output branch October 31, 2026 21:58
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.

bug: Windows build fails silently in Flet 1.0.5 packaging stage and produces incomplete Python runtime (missing dependencies such as certifi)

2 participants