Skip to content

main: a quiet run, and a readable error without zig - #8

Merged
mattrobenolt merged 1 commit into
mainfrom
quiet-output
Nov 26, 2026
Merged

mattrobenolt merged 1 commit into
mainfrom
quiet-output

Conversation

@mattrobenolt

Copy link
Copy Markdown
Member

Two things a user sees that they should not have to.

A plain run printed the std-lib import trace to stderr before the answer. src/Walk.zig logs every import at debug, and an executable's default level is debug, so zigdoc std.mem.Allocator emitted thousands of lines. std_options now sets the level to .warn. Nothing else in the program logs, so no other output moves.

A missing zig on PATH returned error: FileNotFound behind a stack trace. It now prints one line and exits 1:

$ PATH=/usr/bin:/bin zigdoc std.mem.Allocator
zigdoc: no 'zig' on PATH

The second one is #1's finding, reported before the adoption. That patch no longer applies to main.zig, and its printMessage helper is not needed here.

Fixes #7
Supersedes #1

@mattrobenolt
mattrobenolt merged commit aef3e64 into main Nov 26, 2026
10 checks passed
@mattrobenolt
mattrobenolt deleted the quiet-output branch November 26, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Every run prints the import trace to stderr

1 participant