Skip to content

Remove miette#17110

Draft
zanieb wants to merge 7 commits into
mainfrom
zb/miette-remove-ii
Draft

Remove miette#17110
zanieb wants to merge 7 commits into
mainfrom
zb/miette-remove-ii

Conversation

@zanieb

@zanieb zanieb commented Dec 12, 2025

Copy link
Copy Markdown
Member

Remove the direct miette dependency and global hook now that the supporting error-model and printer changes have landed. Operational failures now flow through UvError, with user and unexpected errors retaining distinct exit statuses while the standard printer renders typed source chains and centralized hints. No-solution errors carry their contextual header as an error source, so -q and -qq continue to follow the printer policy.

This is the remaining change after #20188, #20163, #20217, and #20160 were split out and merged.

@zanieb zanieb temporarily deployed to uv-test-registries December 12, 2025 19:12 — with GitHub Actions Inactive
@zanieb zanieb force-pushed the zb/miette-remove-ii branch from af516f2 to 8ef0c55 Compare December 12, 2025 19:26
@zanieb zanieb temporarily deployed to uv-test-registries December 12, 2025 19:28 — with GitHub Actions Inactive
@zanieb zanieb force-pushed the zb/miette-remove-ii branch from 8ef0c55 to 633cf84 Compare December 12, 2025 19:42
@zanieb zanieb temporarily deployed to uv-test-registries December 12, 2025 19:45 — with GitHub Actions Inactive
@zanieb zanieb added the no-build Disable building binaries in CI label Dec 12, 2025
konstin added a commit that referenced this pull request Dec 15, 2025
Split out from #17110

Indent multiline error messages properly, and add test since it wasn't captured previously.
konstin added a commit that referenced this pull request Dec 15, 2025
Split out from #17110

Indent multiline error messages properly, and add a test with a
multiline context and a context below since that combination isn't
captured atm.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
@zanieb zanieb force-pushed the zb/miette-remove-ii branch 2 times, most recently from 16f450d to 4e56519 Compare January 16, 2026 16:53
@zanieb zanieb mentioned this pull request Jan 16, 2026
1 task
@zanieb zanieb force-pushed the zb/miette-remove-ii branch 3 times, most recently from 53e8893 to 73b9b0c Compare January 16, 2026 18:16
@zanieb zanieb force-pushed the zb/miette-remove-ii branch 6 times, most recently from 3932c28 to 66db1a1 Compare January 17, 2026 17:23
Comment thread crates/uv-resolver/src/error.rs Outdated
@zanieb zanieb mentioned this pull request Mar 13, 2026
@codspeed-hq

codspeed-hq Bot commented Mar 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 11 untouched benchmarks
⏩ 14 skipped benchmarks1


Comparing zb/miette-remove-ii (4989a4c) with main (ebf0f43)

Open in CodSpeed

Footnotes

  1. 14 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@codspeed-hq

codspeed-hq Bot commented Mar 15, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 5.07%

⚡ 1 improved benchmark
✅ 4 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation resolve_warm_jupyter 79 ms 75.2 ms +5.07%

Comparing zb/miette-remove-ii (66db1a1) with main (7f44de5)

Open in CodSpeed

zanieb added a commit that referenced this pull request May 20, 2026
This adds abstractions for handing hints, pulling them out of ad-hoc
addendums to error messages and treating them as a first-class concept
so we can render them more consistently.

The key concepts are:

- `Hints`: a wrapper struct for `Vec<Cow<'a, str>>`
- `Hint`: a trait with `hints(&self) -> Hints<'_>`

Error types now `impl Hint` to provide hints. This means errors need to
carry more information to construct the `Hint` lazily instead of ahead
of time. The majority of refactoring around error types is to support
that change.

When displaying errors, we
[downcast](https://github.com/astral-sh/uv/pull/18090/changes#r2935662966)
to each type known to implement the trait and extract hints. We then
display all the hints after the error chain is complete.

The user-facing affect of this is that hints are now always rendered
outside the error chain.

This is a blocker to #17110 and is pulled out of that project. There is
still some weirdness with miette's `help:` prompts that will be removed
entirely in a following change.

---------

Co-authored-by: Codex <noreply@openai.com>
@zanieb zanieb force-pushed the zb/miette-remove-ii branch 3 times, most recently from 6d00af1 to 538e9be Compare May 27, 2026 03:55
Comment thread crates/uv/tests/it/workspace.rs
Comment thread crates/uv/tests/it/build.rs Outdated
Comment thread crates/uv-errors/src/lib.rs Outdated
Comment thread crates/uv-errors/src/lib.rs
Comment thread crates/uv/src/commands/diagnostics.rs Outdated
Comment thread crates/uv/src/commands/diagnostics.rs Outdated
Comment thread crates/uv/src/commands/diagnostics.rs Outdated
@zanieb zanieb force-pushed the zb/miette-remove-ii branch 2 times, most recently from 1ef8e53 to 3fbbb93 Compare May 28, 2026 18:27
@astral-sh-bot

astral-sh-bot Bot commented May 28, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the latest main baseline.

  • Added tests: 2
  • Removed tests: 0
  • Changed suites: 2
uv-client::it: +1 / -0

Added:

  • uv-client::it::ssl_certs::test_tls_failure_suggests_system_certs_only_when_disabled

Removed: none

uv::it: +1 / -0

Added:

  • uv::it::check::check_unsatisfiable_project

Removed: none

@zanieb zanieb force-pushed the zb/miette-remove-ii branch from 549ed8c to d33bd17 Compare June 2, 2026 16:26
zanieb added a commit that referenced this pull request Jul 7, 2026
Keep `ExitStatus` code-only and represent propagated command errors
explicitly as `UvError::User` or `UvError::Unexpected`. Command handlers
classify and propagate their errors; the entrypoint renders user errors
as a single line with exit code 1 and renders unclassified error chains
with exit code 2. This preserves the existing default text and exit
codes while providing a behavior-focused alternative to the
error-carrying `ExitStatus` introduced in #20114.

The stacked follow-up #20163 routes this centralized rendering through
`Printer` and defines the resulting `-q` and `-qq` behavior.

Part of #17110.
zanieb added a commit that referenced this pull request Jul 7, 2026
Render final `UvError` values through `Printer` at the command
entrypoint. The default error-chain renderer accepts the `Printer`
directly and owns hint collection and stream selection; `-q` preserves
final errors and `-qq` suppresses them while exit codes remain 1 for
user errors and 2 for unexpected errors. Stacked on #20188.

Part of #17110.
Closes #19326.
zanieb added a commit that referenced this pull request Jul 7, 2026
Render `UvError::User` with the standard error-chain renderer instead of
formatting only the outer message. This preserves causal context while
retaining exit code 1 and the existing printer behavior: `-q` preserves
the error and `-qq` suppresses it. The stacked #20160 relies on this to
preserve the cause of an invalid `--with` requirement. Part of #17110.
zanieb added a commit that referenced this pull request Jul 7, 2026
Classify invalid `uv tool run --with` requirements as `UvError::User` so
the entrypoint owns final rendering and exit-status selection instead of
printing a local miette report. The expected error retains exit code 1
and its full cause chain. Builds on the user-error renderer from #20217.

Part of #17110.
@zanieb zanieb force-pushed the zb/miette-remove-ii branch from d33bd17 to ce3669a Compare July 7, 2026 21:43
@zanieb zanieb force-pushed the zb/miette-remove-ii branch from ce3669a to b48ee5e Compare July 7, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-build Disable building binaries in CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant