Expand --serialParse flag to also apply to Composer.uniqueTypesAndFunctions #1301
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 PR expands the
--serialParse
flag to also apply toComposer.uniqueTypesAndFunctions
, so it also performs work serially instead of concurrently.This is a follow-up to #1063.
Eric posted that PR to work around a concurrency-related crash we hit in Sourcery when running it on Airbnb's app codebase. Since then, we've internally been using a custom build of Sourcery with that change plus an additional change that updates
Composer.uniqueTypesAndFunctions
to also be serial. I've confirmed that we still occasionally see concurrency-related crashes without that additional change.The
--serialParse
flag was introduced as a way to work around concurrency-related crashes. Since it is possible to hit concurrency-related crashes inComposer.uniqueTypesAndFunctions
, it seems reasonable to expand the--serialParse
option to also disable concurrency within that method. This resolves the crashes we hit internally when trying to adopt Sourcery 2.1.7.