Removing `-strict-concurrency=targeted`

I'll throw some support behind continuing to support -strict-concurrency=targeted.

At Airbnb, we currently have the -strict-concurrency=targeted flag enabled across our entire codebase. We like using targeted concurrency checks because it only applies to code that has explicitly adopted async / await, etc. We had very little code that had adopted async / await at the time we enabled this flag, so it was very easy for us to enable targeted concurrency checks within our codebase.

On the other hand, -strict-concurrency=strict applies to all code in the codebase. Within a large existing codebase (Airbnb's app codebase is 2M+ LOC), adopting strict concurrency checking would be a huge amount of work.

We like that we are able to enable targeted concurrency checking, because this means that any new code using async / await will have this concurrency checking enabled. This increases the correctness of any new code using async / await, and reduces the total amount of work in enabling strict concurrency checking in the future (since this portion of the code is already following the strict concurrency rules).

5 Likes