Skip to content

Count leaked processes in one line; list them with --show-leaked-processes - #15

Open
richardcocks wants to merge 1 commit into
mainfrom
show-leaked-processes
Open

richardcocks wants to merge 1 commit into
mainfrom
show-leaked-processes

Conversation

@richardcocks

Copy link
Copy Markdown
Owner

Summary

The end-of-run leak report printed one vouch: <test> left <mfa> running line per leaked process. A suite with a known leaky fixture repeats the same wall of lines after every run, which is noise in watch mode.

  • By default the report is now a single line counting the leaks and naming the flag that lists them:

    vouch: 24 leaked processes killed after the test that started them (--show-leaked-processes lists them)
    
  • New flag --show-leaked-processes brings back the per-leak lines, named by the test and by what started it. On the JavaScript target it gets the same "has no effect" warning as its siblings.

  • The line moves from after the summary to after the result lines and before the Failures: block, so a one-line notice is not lost under long failure details. Crash reports (--show-crash-reports) and unattributed crash reports stay after the summary.

  • runner.run and its helpers now take the parsed config.Config instead of a growing list of positional flags, collapsing the six repeated call sites in vouch.gleam. Internal API only.

  • --keep-leaked-processes output follows the same count-only default.

README and CHANGELOG are deliberately untouched in this PR.

Test plan

  • gleam test on Erlang: 104 passed (includes the e2e that runs the playground in default, --show-leaked-processes and --keep-leaked-processes modes, and asserts the count line lands before Failures:)
  • gleam test --target javascript: 79 passed
  • New config_show_leaked_processes_test
  • Playground run by hand in all three modes; JS ineffective-flag warning confirmed
  • gleam format --check clean

🤖 Generated with Claude Code

…esses

The end-of-run leak report printed one "left ... running" line per leak.
A suite with a known leaky fixture repeats the same wall of lines after
every run, which is noise in watch mode. By default the report is now a
single line counting the leaks and naming the flag that lists them; the
per-leak lines, named by the test and by what started it, come back with
--show-leaked-processes.

The line also moves from after the summary to before the failures list,
so a one-line notice is not lost under long failure details. Crash
reports stay after the summary.

runner.run and its helpers take the parsed config.Config instead of a
growing list of positional flags, which collapses the six repeated call
sites in vouch.gleam.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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