killercup / killercup/convey

Flush correctly

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Rust
Stars
38
Forks
6
PR merge metrics
No merged PRs in 30d

Description

When trying to `impl Drop for InnerOutput`, we quickly run into the issue of

```console
thread '' panicked at 'cannot access stdout during shutdown', src/libcore/option.rs:1008:5
```

since most usages of `Output` are in main. The trivial solution is to add `output.flush()?;` to your `fn main`, but that's not very ergonomic.

Contributor guide

Open the contributing guide

Research direction

Start by locating InnerOutput, Output, and the fn main usage described in the issue, then reproduce the shutdown panic involving stdout. Check how Output is finalized and determine how flushing can happen without requiring each main function to call output.flush(). Done means Output shuts down without the panic while preserving its human- and machine-readable output.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.