#miette — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #miette, aggregated by home.social.
-
Shadow cat was sitting in a doorway, and complained at spouse when he stepped over her. When I wanted to go through, I tapped her gently with my foot to see if she would move.
She did, but she also shouted at me.
I had to quote Miette. Shadow glared.
-
Shadow cat was sitting in a doorway, and complained at spouse when he stepped over her. When I wanted to go through, I tapped her gently with my foot to see if she would move.
She did, but she also shouted at me.
I had to quote Miette. Shadow glared.
-
SONARIUM vol. III @ 10 Avenue Des Pins Ouest - 14 Mar feat. euphorism, Safia Nihil, Miette
-
I am once again reminded that I should probably do a better job of letting people know that if they use miette, or things that use miette, you can put
NO_GRAPHICS=1in an env var, and instead of drawing fancy graphical diagnostics, miette will automatically drop into a "narratable" renderer that's optimized for screen readers. The output looks like:oops!
Diagnostic severity: error
Begin snippet for bad_file.rs starting at line 1, column 1
snippet line 1: source
snippet line 2: text
label at line 2, columns 3 to 6: this bit here
snippet line 3: here
diagnostic help: try doing it better next time?
diagnostic code: oops::my::badThis works for any tool or library using miette unless they're manually messing with renderer settings and preventing this fallback from happening.
-
I am once again reminded that I should probably do a better job of letting people know that if they use miette, or things that use miette, you can put
NO_GRAPHICS=1in an env var, and instead of drawing fancy graphical diagnostics, miette will automatically drop into a "narratable" renderer that's optimized for screen readers. The output looks like:oops!
Diagnostic severity: error
Begin snippet for bad_file.rs starting at line 1, column 1
snippet line 1: source
snippet line 2: text
label at line 2, columns 3 to 6: this bit here
snippet line 3: here
diagnostic help: try doing it better next time?
diagnostic code: oops::my::badThis works for any tool or library using miette unless they're manually messing with renderer settings and preventing this fallback from happening.
-
so this is happening.
All my #Rust #RustLang repos are moved over. Now I just need to figure out CI, republish to crates.io, and archive the github side (and document a tombstone in their readmes).
I have a bunch of other repos I'll either archive or delete as well.
#KDL and #orogene will remain github-side for now because they're a bit more dependent on github services, but I would like to at least move orogene over eventually. KDL might be stuck, though, unfortunately, but I might move only kdl-rs.
-
so this is happening.
All my #Rust #RustLang repos are moved over. Now I just need to figure out CI, republish to crates.io, and archive the github side (and document a tombstone in their readmes).
I have a bunch of other repos I'll either archive or delete as well.
#KDL and #orogene will remain github-side for now because they're a bit more dependent on github services, but I would like to at least move orogene over eventually. KDL might be stuck, though, unfortunately, but I might move only kdl-rs.
-
Apparently, #swc uses #miette now too: https://github.com/zkat/miette/issues/429
-
Apparently, #swc uses #miette now too: https://github.com/zkat/miette/issues/429
-
So I may have come up with a genuinely reasonable alternative to anyhow-style error globbing that retains stack information between calls while still being statically typed and properly implementing std::error::Error and it was so simple I’m pretty convinced I’m actually going down into a dead end again because there’s just no way this hasn’t already become the de facto way to manage Rust errors
If this works out, this is going to be the foundation for #miette going forward.
-
So I may have come up with a genuinely reasonable alternative to anyhow-style error globbing that retains stack information between calls while still being statically typed and properly implementing std::error::Error and it was so simple I’m pretty convinced I’m actually going down into a dead end again because there’s just no way this hasn’t already become the de facto way to manage Rust errors
If this works out, this is going to be the foundation for #miette going forward.
-
how offended would y'all be if I revisited some major #Miette APIs and changed a bit about how it works as an error library, and took the chance to same some specifics around e.g. spans and such?
I value stability a lot so I've been hesitant to do this, but I think these changes might be valuable enough that the community will be willing to migrate to them over time. I'll try and see what the migration/compat path looks like, too, once I've got something that makes me feel like it's worth migrating TO.
-
how offended would y'all be if I revisited some major #Miette APIs and changed a bit about how it works as an error library, and took the chance to same some specifics around e.g. spans and such?
I value stability a lot so I've been hesitant to do this, but I think these changes might be valuable enough that the community will be willing to migrate to them over time. I'll try and see what the migration/compat path looks like, too, once I've got something that makes me feel like it's worth migrating TO.
-
@JoshGrams https://docs.rs/miette it's an error reporting library for Rust :))) #miette
-
@JoshGrams https://docs.rs/miette it's an error reporting library for Rust :))) #miette
-
Mini-rust in Rust 009: Nicer parsing errors
-
Mini-rust in Rust 009: Nicer parsing errors
-
I was having nice warm fuzzy feelings because even though #orogene itself is kind of on pause (for now), it’s actually spawned multiple widely-used projects:
- #miette was extracted from orogene, because it’s what I was building for rich errors/error codes/etc
- #kdl was created with the intention of being the configuration file for orogene, as well as an alternative syntax for package.json with more bells and whistles
- We had to write an NPM-compatible #semver package in Rust, because the semantics are actually different from Cargo’s semver implementation: https://crates.io/crates/node-semver
- The orogene resolver is published as a wasm NPM package, and is currently used by vscode.dev for doing in-browser, full fledged intellisense (because you need access to your dependencies to get their types, source definitions, etc). You can literally GoToDef and you don’t need a vm/desktop for it
I think that’s it so far? And of course I’ve had the opportunity to share a lot of learning about performance that have been used by more recent package managers in other ecosystems!
-
I was having nice warm fuzzy feelings because even though #orogene itself is kind of on pause (for now), it’s actually spawned multiple widely-used projects:
- #miette was extracted from orogene, because it’s what I was building for rich errors/error codes/etc
- #kdl was created with the intention of being the configuration file for orogene, as well as an alternative syntax for package.json with more bells and whistles
- We had to write an NPM-compatible #semver package in Rust, because the semantics are actually different from Cargo’s semver implementation: https://crates.io/crates/node-semver
- The orogene resolver is published as a wasm NPM package, and is currently used by vscode.dev for doing in-browser, full fledged intellisense (because you need access to your dependencies to get their types, source definitions, etc). You can literally GoToDef and you don’t need a vm/desktop for it
I think that’s it so far? And of course I’ve had the opportunity to share a lot of learning about performance that have been used by more recent package managers in other ecosystems!
-
I was struggeling to report the source cause of an error in a #rust codebase!
The #thiserror crate and #miette crate seemed to be the right set of tools for this.
Although it hasn't been easy to figure out!
( but I didn't even cry 😏)Once you master both, error reporting in #rust becomes fun, standardized, colorful and painless!
-
I was struggeling to report the source cause of an error in a #rust codebase!
The #thiserror crate and #miette crate seemed to be the right set of tools for this.
Although it hasn't been easy to figure out!
( but I didn't even cry 😏)Once you master both, error reporting in #rust becomes fun, standardized, colorful and painless!
-
-
-
took a moment to prettify kdl-rs' compliance test suite output with #miette and tbh this was worth it and is gonna make my life a lot easier.
-
took a moment to prettify kdl-rs' compliance test suite output with #miette and tbh this was worth it and is gonna make my life a lot easier.
-
Here’s a more controversial one: should #miette’s current Report type (which is basically anyhow’s Error), be replaced with this more limited version that is usable at both the library and application level? A lot of the nice things from anyhow can be reproduced, like context messages and Backtraces, but it wouldn’t be quite as magical at the application level. I think it might work out nicely if you Box, though?
-
Here’s a more controversial one: should #miette’s current Report type (which is basically anyhow’s Error), be replaced with this more limited version that is usable at both the library and application level? A lot of the nice things from anyhow can be reproduced, like context messages and Backtraces, but it wouldn’t be quite as magical at the application level. I think it might work out nicely if you Box, though?
-
#miette users:
Would you be interested in an Err return type wrapper that would enrich arbitrary error types with Backtraces, Spantraces, and possibly other (arbitrary?) context information, but that, unlike anyhow/eyre's Error/Report types, isn't something you need to downcast to get the original error from?
So, you could use this from libraries by just returning
Result<T, MietteCtx<E>>, where E is your custom error type made with miette+thiserror, and all you have to do is call.as_error()on it to get the underlying error, without having to do any weird downcasting? Possibly even with a Deref impl so you can domatch *wrapped_err {...}to match on specific error types?Downside: any existing function signatures would need to change, and you have a (very small) additional memory overhead from this type, and you would need to at least
.into()/?your errors when you return them from your library functions.The upside: you can get backtraces right where the original error happened with very little effort or overhead, and possibly even add rich contextual information in the future.
-
#miette users:
Would you be interested in an Err return type wrapper that would enrich arbitrary error types with Backtraces, Spantraces, and possibly other (arbitrary?) context information, but that, unlike anyhow/eyre's Error/Report types, isn't something you need to downcast to get the original error from?
So, you could use this from libraries by just returning
Result<T, MietteCtx<E>>, where E is your custom error type made with miette+thiserror, and all you have to do is call.as_error()on it to get the underlying error, without having to do any weird downcasting? Possibly even with a Deref impl so you can domatch *wrapped_err {...}to match on specific error types?Downside: any existing function signatures would need to change, and you have a (very small) additional memory overhead from this type, and you would need to at least
.into()/?your errors when you return them from your library functions.The upside: you can get backtraces right where the original error happened with very little effort or overhead, and possibly even add rich contextual information in the future.
-
Rejoice! I've just published #miette v6.0.0, a HUGE release with a TON of nice things, such as improvements to error rendering, as well as syntax highlighting support. 😸
It does include a few breaking changes, including an MSRV bump, so make sure to look at the changelog and update your stuff accordingly! They're fairly small but will be noticeable, most likely.
Check out the changelog here, and join the conversation! https://github.com/zkat/miette/discussions/334
Along with this, I also went ahead and tagged new versions of
is_ci,supports-color,supports-hyperlinks, andsupports-unicode. The last 3 bumped their MSRV in order to use the newstd::io::IsTerminalAPI to remove a dependency. -
Rejoice! I've just published #miette v6.0.0, a HUGE release with a TON of nice things, such as improvements to error rendering, as well as syntax highlighting support. 😸
It does include a few breaking changes, including an MSRV bump, so make sure to look at the changelog and update your stuff accordingly! They're fairly small but will be noticeable, most likely.
Check out the changelog here, and join the conversation! https://github.com/zkat/miette/discussions/334
Along with this, I also went ahead and tagged new versions of
is_ci,supports-color,supports-hyperlinks, andsupports-unicode. The last 3 bumped their MSRV in order to use the newstd::io::IsTerminalAPI to remove a dependency. -
My hand: *slightly grazes a corner of my glasses lense*
My glasses: you TOUCH glasses? you touch them like the keyboard? oh! oh! blurriness for father! blurriness for One Thousand Years!
-
possibly Coming Soon™️ to #miette: https://github.com/zkat/miette/issues/67#issuecomment-1783085030
-
possibly Coming Soon™️ to #miette: https://github.com/zkat/miette/issues/67#issuecomment-1783085030
-
Mother, jailed for One Thousand Years https://www.tumblr.com/incorrectdarmok/723296959277957120 #StarTrek #Miette
-
Mother, jailed for One Thousand Years https://www.tumblr.com/incorrectdarmok/723296959277957120 #StarTrek #Miette
-
Just tagged #miette v5.9.0 with a couple of nice changes. Most notably, diagnostics in the
.diagnostic_cause()chain will be rendered with their snippets, so you don't lose diagnostic info along the way when you wrap them! Thanks to @Hemera for the change!Changelog: https://github.com/zkat/miette/releases/tag/v5.9.0
-
Just tagged #miette v5.9.0 with a couple of nice changes. Most notably, diagnostics in the
.diagnostic_cause()chain will be rendered with their snippets, so you don't lose diagnostic info along the way when you wrap them! Thanks to @Hemera for the change!Changelog: https://github.com/zkat/miette/releases/tag/v5.9.0
-
@clementd thank you! _^ They're all rendered with #miette: https://docs.rs/miette
-
@clementd thank you! _^ They're all rendered with #miette: https://docs.rs/miette
-
This would be such a cool addition to #miette: https://mastodon.gamedev.place/@isadora/110125646666494097
-
This would be such a cool addition to #miette: https://mastodon.gamedev.place/@isadora/110125646666494097
-
Anyway, I've released a new #miette with the syn2 + thiserror 1.0.40 upgrade (they need to be done together! Otherwise everything explodes!), and went ahead and did new releases for cacache, ssri, and kdl-rs, too, while I was at it. That should just about cover it.
-
Anyway, I've released a new #miette with the syn2 + thiserror 1.0.40 upgrade (they need to be done together! Otherwise everything explodes!), and went ahead and did new releases for cacache, ssri, and kdl-rs, too, while I was at it. That should just about cover it.
-
Thanks for #zero2production, for exploring the design space with #pavex, and especially for your focus on helpful, elegant error handling. @algo_luca
Thank you @zkat for #miette, it makes me happy to look at its error reports.
-
Thanks for #zero2production, for exploring the design space with #pavex, and especially for your focus on helpful, elegant error handling. @algo_luca
Thank you @zkat for #miette, it makes me happy to look at its error reports.
-
holy dang. I keep running into #miette in the weirdest places. It keeps spreading!
Today: I noticed miette error messages in a new web framework while reading their blog post: https://www.lpalmieri.com/posts/pavex-progress-report-01/
And then while browsing through the dependents list for miette after that, I found that the cargo tooling for AWS Lambda is apparently using it, too: https://crates.io/crates/cargo-lambda/0.17.1/dependencies
huh. people are using my thing?
-
holy dang. I keep running into #miette in the weirdest places. It keeps spreading!
Today: I noticed miette error messages in a new web framework while reading their blog post: https://www.lpalmieri.com/posts/pavex-progress-report-01/
And then while browsing through the dependents list for miette after that, I found that the cargo tooling for AWS Lambda is apparently using it, too: https://crates.io/crates/cargo-lambda/0.17.1/dependencies
huh. people are using my thing?
-
omg it works! My #kdl #KQL engine works beautifully!
So to summarize:
a > b 👉🏻 any child "b" of node "a"
a >> b 👉🏻 any descendant "b" of node "a"
a + b 👉🏻 any "b" that immediately follows an "a" node under the same parent
a ++ b 👉🏻 any "b" anywhere after "a" under the same parent.I've also got multiple parallel selectors working (with the `,` operator, just like CSS), and some magic around the toplevel `scope()` selector that lets you do things like `scope() > a` to make sure you're selecting only direct children of the *current* document/node you're querying from.
Whew. It's been a couple of days but this was really fun! 💯 would parse again.
Oh and it has all the nice error reporting you would expect from a tool that uses #miette 😉
-
omg it works! My #kdl #KQL engine works beautifully!
So to summarize:
a > b 👉🏻 any child "b" of node "a"
a >> b 👉🏻 any descendant "b" of node "a"
a + b 👉🏻 any "b" that immediately follows an "a" node under the same parent
a ++ b 👉🏻 any "b" anywhere after "a" under the same parent.I've also got multiple parallel selectors working (with the `,` operator, just like CSS), and some magic around the toplevel `scope()` selector that lets you do things like `scope() > a` to make sure you're selecting only direct children of the *current* document/node you're querying from.
Whew. It's been a couple of days but this was really fun! 💯 would parse again.
Oh and it has all the nice error reporting you would expect from a tool that uses #miette 😉
-
new #miette release just dropped, lads: https://github.com/zkat/miette/releases/tag/v5.5.0
Technically a semver-minor but mostly just fixing a panic and some thorns on the side. Nothing too big.
-
new #miette release just dropped, lads: https://github.com/zkat/miette/releases/tag/v5.5.0
Technically a semver-minor but mostly just fixing a panic and some thorns on the side. Nothing too big.