You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Tests/AppTests/__Snapshots__/WebpageSnapshotTests/test_ReadyForSwift6Show.1.html
+27-5Lines changed: 27 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -78,15 +78,16 @@ <h1>
78
78
<main>
79
79
<divclass="inner">
80
80
<h2>Ready for Swift 6</h2>
81
-
<p>Swift 6 brings with it the ability to check your code for concurrency and data race issues. If switched on, the Swift compiler will produce errors where you could have data races.</p>
82
-
<p>For help migrating your code, see the
83
-
<ahref="https://example.com">Swift 6 language mode migration guide</a> or the
84
-
<ahref="https://example.com">Swift 6 release blog post</a>
85
-
</p>
81
+
<p>The Swift 6 language mode prevents data-races at compile time. When you opt into Swift 6 mode, the compiler will produce errors when your code has a risk of concurrent access, turning hard-to-debug runtime failures into compiler errors.</p>
82
+
<p>To track the progress of the Swift package ecosystem, the Swift Package Index is running regular package compatibility checks across all packages in the index.</p>
86
83
<p>To track the progress of the Swift package ecosystem, the Swift Package Index is running regular package compatibility checks across all packages in the index.</p>
87
84
<h3>Total packages compatible with Swift 6</h3>
85
+
<p>Packages with zero data-race safety compiler diagnostics during a successful build on at least one tested platform.</p>
88
86
<p>Couldn’t load chart data.</p>
89
87
<h3>Total Swift 6 concurrency errors</h3>
88
+
<p>The total number of all data-race safety diagnostics across
<strong>A: </strong>We define compatibility in the same way we do on package pages. If any build of the package completes successfully on any of our tested platforms (macOS via SwiftPM, macOS via XcodeBuild, iOS, visionOS, watchOS, tvOS, or Linux) then that build is deemed compatible with the Swift version.
97
98
</p>
98
99
<hrclass="minor"/>
100
+
<p>
101
+
<strong>Q: </strong>Are additional parameters added to the build command for these tests compared to the “standard” Swift Package Index builds that determine Swift version compatibility on package pages?
102
+
</p>
103
+
<p>
104
+
<strong>A: </strong>Yes. The builds that produce the results on this page have strict concurrency checking set to
105
+
<code>complete</code> to check for data race safety in Swift 6 language mode. We pass
106
+
<code>-strict-concurrency=complete</code> to either
107
+
<code>swift build</code> or
108
+
<code>xcodebuild</code>.
109
+
</p>
110
+
<hrclass="minor"/>
111
+
<p>
112
+
<strong>Q: </strong>Why use
113
+
<code>-strict-concurrency=complete</code> instead of
114
+
<code>-swift-version 6</code>?
115
+
</p>
116
+
<p>
117
+
<strong>A: </strong>Data-race safety diagnostics are determined in different stages of the compiler. For example, type checking produces some data-race safety errors, and others are diagnosed during control-flow analysis after code generation. If type checking produces errors, the compiler will not proceed to code generation, so testing with
118
+
<code>-swift-version 6</code> would show fewer errors than really exist across the package ecosystem.
119
+
</p>
120
+
<hrclass="minor"/>
99
121
<p>
100
122
<strong>Q: </strong>What does “total concurrency errors” mean?
0 commit comments