Skip to content

Report CLI and server errors instead of panicking - #17

Merged
rustfuture merged 1 commit into
mainfrom
clear-cli-errors
Oct 5, 2026
Merged

rustfuture merged 1 commit into
mainfrom
clear-cli-errors

Conversation

@rustfuture

Copy link
Copy Markdown
Owner

Indexing, saving or loading an index and binding the HTTP listener now print
one "error: ..." line to stderr and exit with code 1 (usage errors keep code 2).
A poisoned index lock in the server is recovered with into_inner(): the index is
read-only between reloads, so serving the last state beats taking the server down.
Tests cover a missing repository, a missing index file and an occupied address.

Checked locally: cargo fmt --check, clippy -D warnings, cargo test (42 passed), evaluation/v3 unittest, evaluate.py, evaluate_modes.py; the four error paths were also run by hand against the built binary.

Indexing, saving or loading an index and binding the HTTP listener now print
one "error: ..." line to stderr and exit with code 1 (usage errors keep code 2).
A poisoned index lock in the server is recovered with into_inner(): the index is
read-only between reloads, so serving the last state beats taking the server down.
Tests cover a missing repository, a missing index file and an occupied address.
@rustfuture
rustfuture merged commit 9cebc80 into main Oct 5, 2026
3 checks passed
@rustfuture
rustfuture deleted the clear-cli-errors branch October 5, 2026 10:10
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