Skip to content

DUX-5106 miette -> eyre#440

Merged
9999years merged 1 commit into
mainfrom
wiggles/dux-5106/xkpp
Apr 28, 2026
Merged

DUX-5106 miette -> eyre#440
9999years merged 1 commit into
mainfrom
wiggles/dux-5106/xkpp

Conversation

@9999years
Copy link
Copy Markdown
Member

miette::IntoDiagnostic hides the original error from downcasting methods, which means that it's impossible (in the rare cases where we want one) to get an error out of a miette::Result to match on it.

IntoDiagnostic is mandatory for error types that don't implement miette::Diagnostic, which (inherently) includes all of the std error types. I could define my own wrapper types for everything I want to match on, but that's a big hassle that just isn't worth it.

This has been an open issue for 4 years now, but we haven't really needed to match on inner errors before. Now that we do, it's a dealbreaker.

See: zkat/miette#155

`miette::IntoDiagnostic` hides the original error from downcasting
methods, which means that it's impossible (in the rare cases where we
want one) to get an error _out_ of a `miette::Result` to match on it.

`IntoDiagnostic` is mandatory for error types that don't implement
`miette::Diagnostic`, which (inherently) includes all of the `std` error
types. I could define my own wrapper types for everything I want to
match on, but that's a big hassle that just isn't worth it.

This has been an open issue for 4 years now, but we haven't really
needed to match on inner errors before. Now that we do, it's a
dealbreaker.

See: zkat/miette#155
@linear
Copy link
Copy Markdown

linear Bot commented Apr 28, 2026

DUX-5106 miette -> eyre

@9999years 9999years marked this pull request as ready for review April 28, 2026 20:00
@9999years 9999years requested a review from a team as a code owner April 28, 2026 20:00
@9999years 9999years requested review from csamak and hdgarrood April 28, 2026 20:00
@9999years 9999years enabled auto-merge (squash) April 28, 2026 20:00
Comment thread test-harness/Cargo.toml
itertools = "0.11.0"
miette = { version = "5.9.0", features = ["fancy"] }
nix = { version = "0.26.2", default-features = false, features = ["process", "signal"] }
eyre = "*"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we pin it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's pinned in the top-level Cargo.toml, so this will just resolve to the same version.

@9999years 9999years merged commit 3577858 into main Apr 28, 2026
39 checks passed
@9999years 9999years deleted the wiggles/dux-5106/xkpp branch April 28, 2026 21:31
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.

2 participants