Skip to content

ruff analyze graph | head -n 10 panics #13442

@tpgillam

Description

@tpgillam

It seems like ruff analyze graph is sometimes unhappy when its output isn't fully consumed.

Tested with ruffs 0.6.6 and 0.6.7:

> uv run ruff analyze graph -q | wc -l
2382
> uv run ruff analyze graph -q | head -n 10

<snip 10 correct lines of output>

error: Ruff crashed. If you could open an issue at:

    https://github.com/astral-sh/ruff/issues/new?title=%5BPanic%5D

...quoting the executed command, along with the relevant file contents and `pyproject.toml` settings, we'd be very appreciative!

thread 'main' panicked at library/std/src/io/stdio.rs:1118:9:
failed printing to stdout: Broken pipe (os error 32)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

A full example to reproduce, starting in an otherwise empty directory, would be:

git clone https://github.com/Eomys/pyleecan.git --depth=1
uv init
uv add ruff==0.6.7
uv run ruff analyze graph | head -n 10

edit: above is running on MacOS 14.6.1 . Although head is the GNU version from homebrew's coreutils

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions