Stream: project-error-handling

Topic: Book Error Handling BoF


view this post on Zulip Jane Lusby (Feb 06 2021 at 00:09):

Alright I setup the poll: https://doodle.com/poll/7x5dw8ysrxux6k9i?utm_source=poll&utm_medium=link

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:10):

I tenatively put times during next week

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:10):

45 minutes might be too little now that I think of it

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:10):

let me see if I can edit those times easily

view this post on Zulip oliver (Feb 06 2021 at 00:12):

we can also shorten birds of a feather to BoF to save fingers

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:13):

:+1:

view this post on Zulip oliver (Feb 06 2021 at 00:14):

and our first agenda is either to start on the error handling book OR contributions to the reference

view this post on Zulip oliver (Feb 06 2021 at 00:15):

I'm not sure we've thought about adding to the reference yet

view this post on Zulip oliver (Feb 06 2021 at 00:18):

I think there may be a gap in the references coverage of errors and error handling

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:20):

first thing that comes to mind is the panic internals

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:20):

and how well documented that is

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:20):

not sure if that could use some more detail

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:20):

or if its even in there

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:20):

tho that might be more for the rustc-dev-guide

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:21):

btw let me know if people would prefer text or video

view this post on Zulip oliver (Feb 06 2021 at 00:21):

https://doc.rust-lang.org/reference/runtime.html?highlight=panic#the-panic_handler-attribute

view this post on Zulip oliver (Feb 06 2021 at 00:21):

is that sufficient iyo?

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 06 2021 at 00:21):

with some user friendly interjections for newbies :octopus:

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:21):

oliver said:

is that sufficient iyo?

yea

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:21):

looks great tbh

view this post on Zulip oliver (Feb 06 2021 at 00:22):

I don't think I've ever seen panic code like that :thinking:

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:22):

tho we will probably have to add backtrace stuff to this "Rust Runtime" section some day if my PR continues the direction its going

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:22):

@oliver thats because #[panic_handler] is normally defined by std

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:22):

so you'll only see if in no_std code

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:23):

std builds std::panic::set_hook ontop of their internally defined #[panic_handler]

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:23):

so set_hook is dynamic

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:23):

but #[panic_handler] is linker magic

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:23):

tho its not really magic

view this post on Zulip oliver (Feb 06 2021 at 00:23):

Jane Lusby said:

oliver thats because #[panic_handler] is normally defined by std

lol literally the next section https://doc.rust-lang.org/reference/runtime.html?highlight=panic#standard-behavior

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:23):

heh yea

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:23):

like i said

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:23):

the documentation looks good!

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:23):

happy to see it

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:24):

but yea we should definitely audit all the error handling related language featuers

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:24):

i think a lot of our documentation wont end up belonging in the reference

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:24):

because a lot of it is library level rather than language level

view this post on Zulip oliver (Feb 06 2021 at 00:24):

oic

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:24):

or even just stylistic

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:24):

but we should still check

view this post on Zulip oliver (Feb 06 2021 at 00:24):

I'll add it to the task board

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:24):

tyty

view this post on Zulip oliver (Feb 06 2021 at 00:26):

https://github.com/rust-lang/project-error-handling/projects/1#card-54364288

view this post on Zulip oliver (Feb 06 2021 at 00:26):

hmm reminds me I left off reviewing legacy issues some time ago

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 06 2021 at 00:28):

In the book, is it possible to have a link to dylib or cdylib crate for someone that might want to see what that particular crate is? I'm looking at the panic_handler attribute doc

view this post on Zulip oliver (Feb 06 2021 at 00:31):

I think all links have to be done in the body of text

view this post on Zulip oliver (Feb 06 2021 at 00:32):

I think the code sections are actually live(ish) runtime environments

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 06 2021 at 00:37):

I'm not as well versed in a majority of what's available in the ecosystem so for something like that panic_handler doc, I'd have to go to the dylib and cdylib crates to see what they also do. I would assume there are others in my position as well.

view this post on Zulip oliver (Feb 06 2021 at 00:39):

maybe we should start arewepanicingyet.com?

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 06 2021 at 00:43):

Never panic :grinning:

view this post on Zulip oliver (Feb 06 2021 at 00:44):

livin' the panic life

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 06 2021 at 00:44):

After a while, you get use to it.

view this post on Zulip oliver (Feb 06 2021 at 00:45):

I think that's where the reference is interesting since it helps separate the internal
Rust lang concerns from a broader ecosystem of alternatives and approaches

view this post on Zulip oliver (Feb 06 2021 at 00:46):

where libs has interests in both sides internal and external

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 06 2021 at 00:58):

Interesting

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:59):

Charles Ellis O'Riley Jr. said:

In the book, is it possible to have a link to dylib or cdylib crate for someone that might want to see what that particular crate is? I'm looking at the panic_handler attribute doc

cdylib and dylib are types of crates not specific crates

view this post on Zulip Jane Lusby (Feb 06 2021 at 00:59):

as in dynamic libraries

view this post on Zulip Jane Lusby (Feb 06 2021 at 01:00):

i think cdylib is a c ABI dynamic library

view this post on Zulip Jane Lusby (Feb 06 2021 at 01:00):

and dylib is a rust unstable ABI dynamic library

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 06 2021 at 02:53):

Thanks Jane

view this post on Zulip Jane Lusby (Feb 11 2021 at 01:40):

@oliver @Jakub Duchniewicz I'm sorry for not following up on the doodle poll earlier

view this post on Zulip Jane Lusby (Feb 11 2021 at 01:40):

But let's go ahead and schedule this for tomorrow

view this post on Zulip Jane Lusby (Feb 11 2021 at 01:40):

It looks like all 3 of us are available tomorrow from 12-2 pst

view this post on Zulip Jane Lusby (Feb 11 2021 at 01:40):

That still sound good to y'all?

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 11 2021 at 01:45):

If I can contribute, I’m available

view this post on Zulip oliver (Feb 11 2021 at 01:49):

sounds good to me

view this post on Zulip Jane Lusby (Feb 11 2021 at 19:36):

Reminder that this starts in 25 minutes

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 11 2021 at 19:37):

:+1:

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:00):

alrighty everyone

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:00):

how would everyone prefer to communicate today?

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:00):

I was thinking of creating a jitsi video call

view this post on Zulip oliver (Feb 11 2021 at 20:01):

I've had issues with jitsi in the past

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:01):

is everyone on discord?

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 11 2021 at 20:01):

If it was possible, video conferencing...zoom would b e cool

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:01):

the only problem is I don't have a paid account for zoom

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:01):

so I can't do 2 hour meetings

view this post on Zulip oliver (Feb 11 2021 at 20:01):

yeah I'm on discord

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 11 2021 at 20:02):

I"m not. can someone send a link

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:02):

lets just do zoom

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:02):

gimmi a minute while I setup

view this post on Zulip oliver (Feb 11 2021 at 20:02):

I think you would simply restart the meeting at some point if they lock us out

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:05):

yea

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:05):

https://us05web.zoom.us/j/8442204920?pwd=TnVaRjJ3Tk9qbVlweXZ0ZW4zQ3FvQT09

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:05):

lets see if this works!

view this post on Zulip oliver (Feb 11 2021 at 20:07):

you'll need to let us in @Jane Lusby

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:07):

i did not get a popup for you oliver

view this post on Zulip Jane Lusby (Feb 11 2021 at 20:12):

@Charles Ellis O'Riley Jr. https://github.com/rust-lang/project-error-handling

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 11 2021 at 20:39):

https://rust-unofficial.github.io/patterns/

view this post on Zulip oliver (Feb 12 2021 at 07:42):

I wonder if we ought to start a reading group :thinking:

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 12 2021 at 12:22):

@oliver How do you imagine the reading group?

view this post on Zulip Jakub Duchniewicz (Feb 12 2021 at 16:01):

damn, sorry did not see the messages as I was out yesterday at that time :frown:. Are there any notes from the meeting?

view this post on Zulip Jane Lusby (Feb 12 2021 at 16:02):

Jakub Duchniewicz said:

damn, sorry did not see the messages as I was out yesterday at that time :frown:. Are there any notes from the meeting?

no worries

view this post on Zulip Jane Lusby (Feb 12 2021 at 16:02):

I have a couple of notes but they're not really meeting minutes or anything

view this post on Zulip Jane Lusby (Feb 12 2021 at 16:02):

the main take away is that we're going to start scheduling short sessions to work on pieces of the book every week I think

view this post on Zulip Jane Lusby (Feb 12 2021 at 16:03):

we ended up ending early yesterday because I've not been feeling well recently

view this post on Zulip oliver (Feb 12 2021 at 17:59):

Charles Ellis O'Riley Jr. said:

@oliver How do you imagine the reading group?

usually we would meet informally to read an article or work through a book
like a study group but less structured around course work

view this post on Zulip oliver (Feb 12 2021 at 17:59):

Jane Lusby said:

we ended up ending early yesterday because I've not been feeling well recently

get better soon!! :heart:

view this post on Zulip oliver (Feb 12 2021 at 18:16):

I think in addition to the weekly work sessions we could also be meeting to read
through some related articles, blogs, papers and do a discussion, is anyone
interested in taking part in something along those lines?

view this post on Zulip Sean Chen (he/him) (Feb 12 2021 at 18:18):

Speaking of blog posts to read, did y'all see this gem? https://msirringhaus.github.io/Where-everything-went-wrong/

view this post on Zulip oliver (Feb 12 2021 at 18:22):

cute, Rust doesn't have nullptrs though?

view this post on Zulip oliver (Feb 12 2021 at 18:23):

I think it meant to say Rust handed something back which was interpreted as a nullptr

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 12 2021 at 20:53):

@Sean Chen The concert of the way it’s laid out and explained is, for me, very user friendly/accepting. For me, it’s similar to the way libraries are explained in the R language. I like this.

view this post on Zulip Jane Lusby (Feb 13 2021 at 18:00):

Sean Chen said:

Speaking of blog posts to read, did y'all see this gem? https://msirringhaus.github.io/Where-everything-went-wrong/

i had not :eyes:

view this post on Zulip oliver (Feb 13 2021 at 21:10):

where did you come acroos it @Sean Chen ?

view this post on Zulip Sean Chen (he/him) (Feb 13 2021 at 21:11):

(deleted)

view this post on Zulip Sean Chen (he/him) (Feb 13 2021 at 21:12):

oliver said:

where did you come acroos it Sean Chen ?

On the front page of the Rust subreddit

view this post on Zulip Sean Chen (he/him) (Feb 15 2021 at 20:01):

So the tentative recurring time for this meeting is now Thursdays at 11 PST. Is that starting this week?

view this post on Zulip Jakub Duchniewicz (Feb 15 2021 at 20:01):

could you put it in the >time syntax?

view this post on Zulip Sean Chen (he/him) (Feb 15 2021 at 20:02):

view this post on Zulip DPC (Feb 15 2021 at 20:09):

are you sure that's correct? because it shows me as 09.00 UTC+1 :joy:

view this post on Zulip oliver (Feb 15 2021 at 20:13):

ϐ TZ=UTC date -d 'thursday 11am PST'
Thu Feb 18 19:00:00 UTC 2021

view this post on Zulip DPC (Feb 15 2021 at 20:20):

correected now

view this post on Zulip Jane Lusby (Feb 15 2021 at 21:45):

view this post on Zulip oliver (Feb 16 2021 at 23:54):

for this meeting are we each bringing an error pattern example to look at?

view this post on Zulip Jane Lusby (Feb 17 2021 at 00:04):

I think as long as one person brings a discussion topic we should be good

view this post on Zulip Jane Lusby (Feb 17 2021 at 00:05):

Do you have an pattern you would like to focus on already in mind?

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 17 2021 at 00:10):

@Jane Lusby what exactly do you mean by pattern? Is there an example I could look :eyes: at?

view this post on Zulip Jane Lusby (Feb 17 2021 at 00:14):

@Charles Ellis O'Riley Jr. https://rust-unofficial.github.io/patterns/

view this post on Zulip Jane Lusby (Feb 17 2021 at 00:15):

And https://en.m.wikipedia.org/wiki/Software_design_pattern

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 17 2021 at 00:21):

Thank you. I needed to ensure I would be on the same page.

view this post on Zulip oliver (Feb 17 2021 at 14:05):

Jane Lusby said:

Do you have an pattern you would like to focus on already in mind?

maybe defining custom hooks?

view this post on Zulip Jane Lusby (Feb 17 2021 at 15:41):

For panic handling?

view this post on Zulip oliver (Feb 17 2021 at 15:45):

Jane Lusby said:

For panic handling?

ya or for error handlers I guess

view this post on Zulip Thom Chiovoloni (Feb 17 2021 at 16:27):

i just lurk here, but i feel like most of the error handling patterns i see (definitely including ones i wrote myself) are kinda antipatterns in a lot of ways. there's:

view this post on Zulip Joshua Nelson (Feb 17 2021 at 16:35):

big catch-all error enum (sometimes with extra boxing, sometimes not).

why is this an antipattern?

view this post on Zulip scottmcm (Feb 17 2021 at 16:37):

My guess would be that there's a certain size where exhaustive matching becomes unnecessary (and potentially impossible, as if it's that big it's plausibly #[non_exhaustive]), and it would be better to just use boxing and downcasting.

view this post on Zulip Thom Chiovoloni (Feb 17 2021 at 16:38):

Yeah that basically. in rusqlite i have https://github.com/rusqlite/rusqlite/blob/master/src/error.rs and I'd love to move it to some other model, probably something more io::Error-shaped (that said it would be a huge breaking change and I'm unsure it's worth it)

view this post on Zulip Jane Lusby (Feb 17 2021 at 16:39):

Yea I don't think it's fair to say enum error types are an antipattern in general, but they can definitely be misapplied

view this post on Zulip Thom Chiovoloni (Feb 17 2021 at 16:39):

as soon as you end up storing user errors (as Box<dyn Error + ...>) it's a headache since you end up with your own errors in there in some cases. And then uyou kinda want anyhow-style tearoffs

view this post on Zulip Thom Chiovoloni (Feb 17 2021 at 16:40):

yeah i dont think it's an antipattern until it's very big

view this post on Zulip Thom Chiovoloni (Feb 17 2021 at 16:40):

it also becomes a performance problem since every function does a lot of stack copying to handle the Result

view this post on Zulip oliver (Feb 18 2021 at 08:18):

we planned on having a section for anti-patterns so I think that this information is valid content

view this post on Zulip oliver (Feb 18 2021 at 11:26):

the pattern for custom hooks involves trait-based error typing which doesn't use dyn
but would have a custom trait for adding information as the handler is pushed

view this post on Zulip oliver (Feb 18 2021 at 11:32):

the current outline for editing into is here for everyone:
https://cryptpad.fr/code/#/2/code/edit/1FhyaBOOANgdSTKA8xbYIt8t/

view this post on Zulip Jane Lusby (Feb 18 2021 at 18:59):

setting up a zoom call now

view this post on Zulip Jane Lusby (Feb 18 2021 at 19:00):

https://us05web.zoom.us/j/85717160604?pwd=UnQ2ak1mR3VxemV3VnhGOG4zamQ5dz09

view this post on Zulip Jane Lusby (Feb 18 2021 at 19:01):

lmk if you're having trouble joining

view this post on Zulip Jane Lusby (Feb 18 2021 at 19:08):

https://docs.rs/eyre/0.6.5/eyre/trait.EyreHandler.html

view this post on Zulip Jane Lusby (Feb 18 2021 at 19:10):

https://docs.rs/eyre/0.6.5/eyre/fn.set_hook.html

view this post on Zulip Edmund Cape (Feb 18 2021 at 19:12):

Apologies, where is the index file you referenced?

view this post on Zulip Jane Lusby (Feb 18 2021 at 19:12):

oliver said:

the current outline for editing into is here for everyone:
https://cryptpad.fr/code/#/2/code/edit/1FhyaBOOANgdSTKA8xbYIt8t/

this right here

view this post on Zulip Edmund Cape (Feb 18 2021 at 19:12):

Thank you!

view this post on Zulip Jane Lusby (Feb 18 2021 at 19:13):

https://rust-lang.github.io/async-book/

view this post on Zulip Jane Lusby (Feb 18 2021 at 19:42):

@Sean Chen did you need to go or did you DC?

view this post on Zulip Sean Chen (he/him) (Feb 18 2021 at 19:44):

DC'd :frown:

view this post on Zulip scottmcm (Feb 18 2021 at 19:49):

Thom Chiovoloni said:

it also becomes a performance problem since every function does a lot of stack copying to handle the Result

This seems like it could be a good clippy lint, actually. I didn't see a similar one in a quick scan over the list...

(Also reminds me of the conversation about the potential of special-casing -> Result in rust-abi to do something fancier there...)

view this post on Zulip Jane Lusby (Feb 18 2021 at 20:07):

oh yea, like swift

view this post on Zulip Jane Lusby (Feb 18 2021 at 20:40):

@oliver for the scratch pad, is that automatically backed up and versioned?

view this post on Zulip Jane Lusby (Feb 18 2021 at 20:41):

@Edmund Cape recorded a bunch of notes from todays meeting at the bottom of the summary scratch pad and I just want to make sure we don't accidentally lose them

view this post on Zulip Jane Lusby (Feb 18 2021 at 21:27):

@Edmund Cape you were right, I had misunderstood what sean wanted to work on

view this post on Zulip Jane Lusby (Feb 18 2021 at 21:27):

so sean is gonna handle the minigrep aka cli chapter

view this post on Zulip oliver (Feb 19 2021 at 05:03):

Jane Lusby said:

oliver for the scratch pad, is that automatically backed up and versioned?

yes but you need an account for me to share ownership afiak, otherwise I can revert any documentation terrorism

view this post on Zulip Jane Lusby (Feb 19 2021 at 05:03):

not super worried about terrorism, mostly just accidents

view this post on Zulip Jane Lusby (Feb 19 2021 at 05:03):

but good

view this post on Zulip Jane Lusby (Feb 19 2021 at 05:03):

:+1:

view this post on Zulip oliver (Feb 19 2021 at 05:04):

I think overall I prefer a system where people can contribute anonymously and not have to feel like what they are writing will be attributed back on them somehow

view this post on Zulip oliver (Feb 19 2021 at 05:05):

Jane Lusby said:

not super worried about terrorism, mostly just accidents

:laughing:

view this post on Zulip oliver (Feb 19 2021 at 05:05):

do you have an account I can try to share ownership with you

view this post on Zulip Jane Lusby (Feb 19 2021 at 05:06):

I don't, but I can make one tomorrow

view this post on Zulip oliver (Feb 19 2021 at 05:12):

here is my profile link: https://cryptpad.fr/profile/#/2/profile/view/vahfwEfw7Reskmfpl2wOEtBJ4jOcj3iQktqMTborNBU/

view this post on Zulip Jakub Duchniewicz (Feb 19 2021 at 14:30):

oliver said:

I think overall I prefer a system where people can contribute anonymously and not have to feel like what they are writing will be attributed back on them somehow

I second that, lest somebody hangs us when their computer catches fire and halts after implementing the code from the book

view this post on Zulip oliver (Feb 21 2021 at 15:50):

here's a pretty large enum: https://github.com/Geal/nom/blob/master/src/error.rs#L362

view this post on Zulip Jane Lusby (Feb 21 2021 at 15:51):

That seems fine to me

view this post on Zulip Jane Lusby (Feb 21 2021 at 15:52):

The problem isn't so much when you have many variants as when you have large variants

view this post on Zulip Jane Lusby (Feb 21 2021 at 15:52):

Or when you're wrapping the same error through many paths of interconnecting enums

view this post on Zulip Jane Lusby (Feb 21 2021 at 15:52):

So it's hard to express the match statements you need

view this post on Zulip oliver (Feb 21 2021 at 15:53):

do you have an example of that?

view this post on Zulip oliver (Feb 21 2021 at 15:53):

I'm still looking

view this post on Zulip Jane Lusby (Feb 21 2021 at 15:53):

Tikv maybe?

view this post on Zulip Jane Lusby (Feb 21 2021 at 15:55):

@Nick Cameron might be able to point us at trouble spots

view this post on Zulip oliver (Feb 21 2021 at 15:56):

https://github.com/tikv/tikv/blob/master/src/storage/kv/mod.rs#L372?

view this post on Zulip Jane Lusby (Feb 21 2021 at 16:08):

Not sure

view this post on Zulip Jane Lusby (Feb 21 2021 at 16:08):

https://twitter.com/nick_r_cameron/status/1361457452961566721?s=19

TiKV is a big Rust project and because it must be reliable, we do a lot with errors. Our error handling is a bit of a mess, though I'm not 100% sure if it is an important mess or a just an aesthetically displeasing mess.

- nrc (@nick_r_cameron)

view this post on Zulip Jane Lusby (Feb 21 2021 at 16:08):

Here's a Twitter thread where Nick goes over a bunch of the issues they're facing

view this post on Zulip oliver (Feb 21 2021 at 16:31):

hopefully those are usable code examples, if it's not very information rich idk

view this post on Zulip Nick Cameron (Feb 21 2021 at 20:01):

So, we have loads of error types, for example: in the storage module we have: https://github.com/tikv/tikv/blob/master/src/storage/errors.rs, https://github.com/tikv/tikv/blob/master/src/storage/mvcc/mod.rs, https://github.com/tikv/tikv/blob/master/src/storage/txn/mod.rs#L88, and https://github.com/tikv/tikv/blob/master/src/storage/kv/mod.rs#L286 (storage::Error, storage::mvcc::Error, storage::txn::Error, storage::kv::Error) and they can basically all nest each other plus other errors (std::io::Error or tikv_util::codec::Error, for example) plus they have an Other variant to take a dynamic error. So, you have horrible match statements like this: https://github.com/tikv/tikv/blob/master/src/storage/errors.rs#L190 when trying to find a specific class of error

view this post on Zulip oliver (Feb 22 2021 at 00:25):

this happens.. by design?

view this post on Zulip oliver (Feb 22 2021 at 17:59):

https://twitter.com/nick_r_cameron/status/1361467954395832323?s=20

I think there isn't a technical solution, only a cultural one to not do this. Perhaps augmented by tooling

- nrc (@nick_r_cameron)

view this post on Zulip oliver (Feb 22 2021 at 18:46):

do we have any ideas about tooling? does this just imply lints?

view this post on Zulip Jane Lusby (Feb 22 2021 at 18:48):

Not sure

view this post on Zulip Jane Lusby (Feb 22 2021 at 18:48):

My best guess is to tooling that assists knowing when to box

view this post on Zulip Jane Lusby (Feb 22 2021 at 18:48):

Just basically exposing more information on when error types are getting a bit too large

view this post on Zulip Jane Lusby (Feb 22 2021 at 18:49):

Because I think a lot of the boxing and tikv is to manage stack frame sizes

view this post on Zulip oliver (Feb 22 2021 at 18:49):

should we draft a blog post?

view this post on Zulip oliver (Feb 22 2021 at 18:50):

then include a general example in the anti-patterns section?

view this post on Zulip oliver (Feb 22 2021 at 19:15):

I feel like sounding the alarms about this

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:05):

meeting time

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:05):

@Edmund Cape ty for reminding me

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:05):

and theres no recurring link

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:05):

i just make a zoom meeting each time

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:05):

shit

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:05):

gotta restart my computer, brb

view this post on Zulip Edmund Cape (Feb 25 2021 at 19:05):

Oh :))

view this post on Zulip Charles Ellis O'Riley Jr. (Feb 25 2021 at 19:07):

Is this the regular meeting?

view this post on Zulip Sean Chen (he/him) (Feb 25 2021 at 19:07):

It's the meeting for working on the Error Handling book

view this post on Zulip Edmund Cape (Feb 25 2021 at 19:07):

Yes. Jane is rebooting her system.

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:08):

https://us05web.zoom.us/j/89117362209?pwd=ZFFsNU9oc1puR0x0dmh3RGR0cmd1Zz09

view this post on Zulip Edmund Cape (Feb 25 2021 at 19:12):

do you have link to the notes?

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:13):

https://cryptpad.fr/code/#/2/code/edit/1FhyaBOOANgdSTKA8xbYIt8t/

view this post on Zulip Sean Chen (he/him) (Feb 25 2021 at 19:13):

https://github.com/seanchen1991/error-handling-examples/tree/main/examples/minigrep

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:49):

https://us05web.zoom.us/j/81003608296?pwd=b0RVd1pYenRYWjJsRjhyQ0lIYUJvdz09

view this post on Zulip Edmund Cape (Feb 25 2021 at 19:49):

the meeting is now a pumpkin.

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:49):

new link

view this post on Zulip Edmund Cape (Feb 25 2021 at 19:50):

may you send the new link?

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:50):

Jane Lusby said:

https://us05web.zoom.us/j/81003608296?pwd=b0RVd1pYenRYWjJsRjhyQ0lIYUJvdz09

its this one

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:51):

Jane Lusby said:

https://cryptpad.fr/code/#/2/code/edit/1FhyaBOOANgdSTKA8xbYIt8t/

this one @Edmund Cape

view this post on Zulip Jane Lusby (Feb 25 2021 at 19:53):

Screenshot-from-2021-02-25-11-53-42.png

view this post on Zulip Edmund Cape (Feb 25 2021 at 20:03):

Thank you! edmund.cape@lucivia.com

view this post on Zulip Jane Lusby (Mar 04 2021 at 17:46):

book meeting in 1 hour 15 minutes

view this post on Zulip Jane Lusby (Mar 04 2021 at 17:46):

https://hackmd.io/@rust-libs/SkPmShkLD includes link to the notes from previous meetings

view this post on Zulip Jane Lusby (Mar 04 2021 at 17:46):

and action items

view this post on Zulip Jane Lusby (Mar 04 2021 at 18:24):

35 minutes

view this post on Zulip Jane Lusby (Mar 04 2021 at 19:00):

meeting time

view this post on Zulip Jane Lusby (Mar 04 2021 at 19:00):

https://us05web.zoom.us/j/83399881921?pwd=emM1b2VpdWZNUE0vc3BGZ2FTU0NDZz09

view this post on Zulip Jane Lusby (Mar 04 2021 at 19:12):

seems like we don't have much to talk about today, I'm still working on the blog post and @Charles Ellis O'Riley Jr. is still working on the error handling map diagram

view this post on Zulip Jane Lusby (Mar 04 2021 at 19:12):

we went ahead and called this meeting for now

view this post on Zulip Jane Lusby (Mar 04 2021 at 19:12):

I get the feeling that we might not have a ton of capacity for the book rn so I'm probably going to reduce the meeting frequency on it

view this post on Zulip Jane Lusby (Mar 04 2021 at 19:12):

to every other week

view this post on Zulip Charles Ellis O'Riley Jr. (Mar 04 2021 at 19:14):

:+1:

view this post on Zulip Jane Lusby (Mar 25 2021 at 16:28):

I'm not going to be able to make today's book meeting, if someone else can run it in my absence that would be great, otherwise we may need to cancel this week

view this post on Zulip Charles Ellis O'Riley Jr. (Mar 25 2021 at 17:59):

:+1: Making headway on the diagram.

view this post on Zulip oliver (Mar 25 2021 at 21:38):

I was afk for most of the day :sun_face:


Last updated: Jan 26 2022 at 14:02 UTC