« first day (2474 days earlier)      last day (1005 days later) » 

8:25 AM
@Stargateur Except that it can hardly be the best without following the recommendations from the error handling WG.
 
8:53 AM
@E_net4thecommentaryremover I didn't much understand the article, too many word, not enough list
but there mention anyhow that I HATE
but if I understand correctly snafu do what they advice
I read : This function will give the panic handler access to errors via a dyn Error.
and so I already don't agree
We plan on fixing this by first adding a Report type to the standard library that wraps a &dyn Error more dyn in my dyn
I will stay with my snafu
 
 
4 hours later…
1:00 PM
@Stargateur How else would you write an error report?
 
1:17 PM
@E_net4thecommentaryremover I don't like at all the idea to use handle when you can already do otherwise.
snafu being a POC already
hahahahahahaha
 
1:42 PM
@Stargateur What can you already do?
 
@E_net4thecommentaryremover I have (tried to) remove the guidance of adding source in the current (beta) version of the docs, at least
so what would the snafu-related thing be?
add a Report type?
There's an issue (IIRC) about making a wrapper type so you could do

```
fn main() -> Result<(), Something> {}
```

Then the `Something` wrapper's `Debug` implementation would do the reporting
but you can't easily do the ? anymore
so you'd have to have an inner_main and then inner_main().map_err(Something::new) or another proc_macro
#[snafu::main]
fn main() -> Result<(), MyError> {}
 
@Shepmaster My current vision of the report type would be that it was not intended for propagation. The error would be wrapped at the end of all the "soft unwinding" with it.
 
sure. I just mean that you can't even use ? in your main
because you can't have a From implementation for the reporter and any arbitrary type
 
Intriguing. Then maybe the #[snafu::main] thingamajig would help here?
 
which would basically expand to
let r: Result<FromTheSignature> = (move || { /* main code */ })();
r.map_err(Report::new)
 
1:57 PM
the "error source" problem would not exist if people use snafu
 
@Stargateur False. It existed in my project, and I use snafu.
 
anyhow and thiserror introduce problem that should not have exist
@E_net4thecommentaryremover what problem do you have ?
 
@Stargateur I think you are seeing a different problem
snafu allows collecting the data
but it doesn't help with displaying it
 
I don't understand what you mean
 
2:00 PM
You can't get a nice looking error report with snafu.
Nor make it configurable depending on the needs of the end app.
I mean, you can, but not by concatenating all source messages together.
 
it's too hard to follow, this is a theorical debate here. all this https://blog.rust-lang.org/inside-rust/2021/07/01/What-the-error-handling-project-group-is-working-towards.html is theorical. I need example of code and output to understand what is the problem first.

All I see now is people trying to solve a problem I don't see with solution I don't like
 
> When we run this we would like to see output somewhat like this:
> but what we actually get is this...
That seems pretty concrete to me :shrug:
 
@E_net4thecommentaryremover but in general I'm OK with attempting to address some of these concerns in SNAFU
 
but I don't agree at all with this, I don't get this kind of output with snafu
 
2:07 PM
Probably because you're just printing the error message in a single line.
 
I mean, there take as example a bad error implementation and say "look how it's bad"
first there use expect()
then this is nothing in the error type
 
I mean, two wrongs don't make a right.
"What about these bad APIs that don't throw good errors" is a poor excuse not to work on better error reporting.
 
but not as anyhow do it
ther edon't even talk about lib like snafu
I didn't see anyone
I feel like the view of anyhow is pushing on std without any consideration for other method
 
2:37 PM
The folks in the error handling group do know about snafu FYI.
The blog post only mentions eyre and anyhow because those are already attempts at solving a specific set of problems which thiserror and snafu are currently not tackling.
 
and eyre / anyhow are specifically listed as bad implementations
> With the multi-line output of anyhow and eyre we [...] can no longer separate the error messages of the individual errors in the chain of errors
> libraries [...] abusing the Debug trait [...] like eyre, anyhow, and even sometimes custom error enums use their Debug output to print the full chain of errors in a human readable report
 
well you convince me but this blog is very unclear from my point of view: I don't clearly see what is the real problem, cause for me snafu do the job, and I don't clearly see the solution:
fn report(&self) -> impl Display + '_
where
    Self: Sized,
{
    Report::from(self)
}
is not enough, it's just a sniped, no MCVE...
I feel the blog is more confusing than anything else
 
2:54 PM
It doesn't show concrete solutions yet because they're still working on them.
 
3:23 PM
@E_net4thecommentaryremover related discussion just has with carol: What about unwrap messages (e.g. in tests)
 
3:47 PM
wtf geal did on nom 6
nothing compile anymore and no doc
why change to FnMut omg
that change EVERYTHING
 

« first day (2474 days earlier)      last day (1005 days later) »