bazelbuild / rules_swift

Bazel rules to build Swift on Apple and Linux platforms
Apache License 2.0
307 stars 133 forks source link

Add features for `-strict-concurrency` compiler flag #1282

Open mjburghard opened 3 weeks ago

mjburghard commented 3 weeks ago

I am thinking about adding features to enable the three accepted combinations of -strict-concurrency=<value> and wanted to check if this is useful to anybody else.

My motivation: Configuring the copt using a wrapper macro or passing it as a command line flag is simple, but features allow to easily add/remove this on the whole workspace to e.g. produce datasets for adaption dashboards. A feature is just more convenient.

I propose the following names:

SWIFT_FEATURE_STRICT_CONCURRENCY_MINIMAL = "swift.strict_concurrency.minimal"
SWIFT_FEATURE_STRICT_CONCURRENCY_TARGETED = "swift.strict_concurrency.targeted"
SWIFT_FEATURE_STRICT_CONCURRENCY_COMPLETE = "swift.strict_concurrency.complete"

I should have some time to contribute this in the coming days.

mjburghard commented 3 weeks ago

Opened a draft #1284