ITADN

Support specification of compatibility with `--static-swift-stdlib`

#881OpenMahdiBM 创建于 2024-01-21
M
MahdiBMcommented
As mentioned in issues such as https://github.com/apple/swift/pull/68671 and https://github.com/apple/swift/issues/65097, sometimes a Swift change is incompatible with `--static-swift-stdlib` (as in `swift build -c release --static-swift-stdlib`) but the problem is only discovered later on, after a Swift release. This is despite the fact that using `--static-swift-stdlib` is very common in Server-Side Swift apps, and reference files such as [Vapor's template Dockerfile](https://github.com/vapor/template/blob/main/Dockerfile) have been using this flag for a long time. All these while [SE-0342](https://github.com/apple/swift-evolution/blob/main/proposals/0342-static-link-runtime-libraries-by-default-on-supported-platforms.md) proposed `--static-swift-stdlib` to become the default behavior on platforms like Linux, which has yet to take effect. So, the question is: should this repository support a JSON field to specify compatibility with `--static-swift-stdlib` (e.g. `build_static_stdlib`? That way, it might be easier for the Swift team to keep track of compatibility of Swift releases with projects that use the `--static-swift-stdlib` flag. [Penny](https://github.com/apple/swift-source-compat-suite/pull/880) can be the first project to specify compatibility with that flag in the `projects.json`.
0 条评论