🌍 #376 Refactor - combine the sync and async check state machines#382
Merged
Conversation
nth-commit
force-pushed
the
terra/async-refactor
branch
4 times, most recently
from
May 25, 2023 22:56
efa629b to
5a91f2a
Compare
This was a four month long battle. I picked it up many times throughout, each time being tempted by `git branch -D terra/async-refactor`. Previously, one of the core pieces of infrastructure in GC was copy+pasted between Check/CheckAsync, it was a lot of lines of code to keep in sync. Even though CheckAsync is the primary usecase (it's the entrypoint used by GalaxyCheck.Xunit), I was not keen to drop the synchronous overload, as it would be a giant pain to litter the codebase with async/await. This also means we can mostly forget about testing the async version of the code, as it barely deviates from the sync version at all, only at the entrypoint in `CheckAsync`.
nth-commit
force-pushed
the
terra/async-refactor
branch
from
May 25, 2023 23:01
5a91f2a to
e5c0320
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was a four month long battle. I picked it up many times throughout, each time being tempted by
git branch -D terra/async-refactor.Previously, one of the core pieces of infrastructure in GC was copy+pasted between Check/CheckAsync, it was a lot of lines of code to keep in sync. Even though CheckAsync is the primary usecase (it's the entrypoint used by GalaxyCheck.Xunit), I was not keen to drop the synchronous overload, as it would be a giant pain to litter the codebase with async/await.
This also means we can mostly forget about testing the async version of the code, as it barely deviates from the sync version at all, only at the entrypoint in
CheckAsync.