Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Features] Rename the BuiltinBuildTaskExecutor feature guard.
The name of the `TaskExecutor` protocol was recently changed to remove underscores after the feature was accepted in Swift Evolution. An implication of that rename is that the `buildOrdinaryTaskExecutorRef` builtin changed the type that it expected as the argument. However, the original change landed in the standard library which as since produced swiftinterfaces that contain the following inlinable code: ``` @inlinable public init<E>(ordinary executor: __shared E) where E : _Concurrency._TaskExecutor { #if $BuiltinBuildTaskExecutor self.executor = Builtin.buildOrdinaryTaskExecutorRef(executor) #else fatalError("Swift compiler is incompatible with this SDK version") #endif } ``` When a compiler containing the protocol rename attempts to type check the above inlinable code, it crashes because the builtin is expecting an argument conforming to `TaskExecutor`, which doesn't exist in this version of the standard library. The issue is that the current compiler still supports the `$BuiltinBuildTaskExecutor` feature guard, but the builtin supported has since changed. To resolve this issue, we need to stop supporting the `$BuiltinBuildTaskExecutor` feature guard and introduce a new one that is only supported by compiler versions that contain the rename. This approach relies on nothing having adopted the API, otherwise we would need to stage in the rename as a parallel set of APIs, and only remove the old APIs once nothing is relying on the old _Concurrency swiftinterfaces.
- Loading branch information