Skip to content

Conversation

@MabezDev
Copy link
Member

The progress callbacks get initialized and updated even if we skip a segment. For verification, we add an extra step to the progress which is updated once verification is complete.

@MabezDev MabezDev marked this pull request as draft June 25, 2025 11:37
@MabezDev
Copy link
Member Author

The last commit tries to simplify the logic for progress call backs. I couldn't get it to work with references, so I'm boxing things now. If this isn't acceptable I'll revert back to using if let Some() = progress inside the two flash targets.

@MabezDev
Copy link
Member Author

Eh, I went a different way. I removed the optionality and then added an empty impl as the "do nothing" value.

The progress callbacks get initialized and updated even if we skip a
segment. For verification, we add an extra step to the progress which is
updated once verification is complete.
@MabezDev MabezDev marked this pull request as ready for review June 25, 2025 12:45
@jessebraham
Copy link
Member

I think this is looking pretty good in general, thanks for this. We had discussed using the null object pattern like this when we originally added the callbacks, don't recall why we didn't end up doing it, but I think it's fine.

One nit, I don't love the name EmptyProgressCallbacks, empty doesn't seem like the right word here. With that said, not quite sure what it should be called, so I guess I don't really have any right to say anything 😅

There is one comment from a user which may need addressing still, haven't read through it yet honestly.

@MabezDev
Copy link
Member Author

I think this is looking pretty good in general, thanks for this. We had discussed using the null object pattern like this when we originally added the callbacks, don't recall why we didn't end up doing it, but I think it's fine.

I really did try to make it work nicely with Option<&mut dyn ProgressCallbacks> but after 45mins I gave up 😅.

One nit, I don't love the name EmptyProgressCallbacks, empty doesn't seem like the right word here. With that said, not quite sure what it should be called, so I guess I don't really have any right to say anything 😅

Would DefaultProgressCallbacks be better? I'll change it to that, let me know what you think.

There is one comment from a user which may need addressing still, haven't read through it yet honestly.

Thanks, I missed the skip flag part, that's a good idea, I'll add it.

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@jessebraham jessebraham added this pull request to the merge queue Jun 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2025
@jessebraham jessebraham enabled auto-merge June 27, 2025 07:48
@jessebraham jessebraham added this pull request to the merge queue Jun 27, 2025
Merged via the queue into main with commit c50eb97 Jun 27, 2025
41 checks passed
@jessebraham jessebraham deleted the progress branch June 27, 2025 08:17
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.

4 participants