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: Resources/Markdown/docs/builds.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,8 @@ You can [find more details in this issue](https://github.com/SwiftPackageIndex/S
90
90
91
91
<h3id="data-race-safety">What is data race safety and how is it tested?</h3>
92
92
93
-
The Swift 6.0 compiler can check whether code is safe from data races at compile time when strict concurrency checks are enabled. The data race safety information we publish on package pages comes from metadata output by the compiler during our build process.
93
+
The Swift 6.0 compiler can check whether code is safe from data races at compile time with “complete” concurrency checks enabled. The data race safety information we publish on package pages comes from diagnostics output by the compiler as we build each package.
94
94
95
-
Note that this does not affect package compatibility as shown in the compatibility matrix. A package can be fully compatible with Swift 6.x without opting into struct concurrency mode provided it is not running in Swift 6 language mode. For more information on opting into Swift 6 language mode, [read this for more information](https://www.swift.org/migration/documentation/swift-6-concurrency-migration-guide/completechecking).
95
+
It’s not possible for us to distinguish between a package that genuinely has no data race safety errors and one where the errors are being suppressed. All we can report on is the number of data race errors reported by the compiler.
96
+
97
+
Note that this does not affect package compatibility, as shown in the compatibility matrix. A package can be fully compatible with Swift 6.x without enabling strict concurrency checks, provided it is not running in Swift 6 language mode. For more information on opting into Swift 6 language mode, [read the Swift 6 migration guide for more information](https://www.swift.org/migration/documentation/swift-6-concurrency-migration-guide/completechecking).
Copy file name to clipboardExpand all lines: Sources/App/Views/ReadyForSwift6/ReadyForSwift6Show+View.swift
+20-7Lines changed: 20 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ extension ReadyForSwift6Show {
38
38
overridefunc content()->Node<HTML.BodyContext>{
39
39
.group(
40
40
.h2("Ready for Swift 6"),
41
-
.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."),
41
+
.p("The Swift 6 language mode prevents dataraces 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."),
42
42
.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."),
43
43
.p(
44
44
.text("For help migrating your project's code, see the "),
.text("The total number of all data-race safety diagnostics across "),
62
+
.text("This chart shows the total number of all datarace safety diagnostics across "),
63
63
.em("all"),
64
64
.text(" packages.")
65
65
),
@@ -74,7 +74,7 @@ extension ReadyForSwift6Show {
74
74
),
75
75
.p(
76
76
.strong(.text("A: ")),
77
-
.text("Swift 6 introduces complete concurrency checking, a compiler feature that checks your code for data-race safety. The number of data race safety errors reflects how many issues the compiler detected relating to these concurrency or data-race checks. The total errors chart plots the total number of these errors summed across all packages.")
77
+
.text("Swift 6 introduces complete concurrency checking, a compiler feature that checks your code for datarace safety. The number of data race safety errors reflects how many issues the compiler detected relating to these concurrency or datarace checks. The total errors chart plots the total number of these errors summed across all packages.")
78
78
),
79
79
.hr(
80
80
.class("minor")
@@ -96,6 +96,19 @@ extension ReadyForSwift6Show {
96
96
.hr(
97
97
.class("minor")
98
98
),
99
+
.p(
100
+
.strong(.text("Q: ")),
101
+
.text("Are packages that show zero data race compiler diagnostics guaranteed to be safe from data race errors?")
102
+
),
103
+
.p(
104
+
.strong(.text("A: ")),
105
+
.text("No. We gather data on data race safety from Swift compiler diagnostics with “complete” concurrency checks enabled. We can’t tell if the diagnostics produce zero errors due to a genuine lack of data race safety errors or whether errors have been suppressed using techniques like "),
.text("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 "),
122
+
.text("Datarace safety diagnostics are determined in different stages of the compiler. For example, type checking produces some datarace 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 "),
110
123
.code("-swift-version 6"),
111
124
.text(" would show fewer errors than really exist across the package ecosystem.")
Copy file name to clipboardExpand all lines: Tests/AppTests/__Snapshots__/WebpageSnapshotTests/test_ReadyForSwift6Show.1.html
+15-7Lines changed: 15 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -83,16 +83,16 @@ <h1>
83
83
<main>
84
84
<divclass="inner">
85
85
<h2>Ready for Swift 6</h2>
86
-
<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>
86
+
<p>The Swift 6 language mode prevents dataraces 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>
87
87
<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>
88
88
<p>For help migrating your project's code, see the
89
89
<ahref="https://www.swift.org/migration/documentation/migrationguide/">Swift 6 language mode migration guide</a>.
90
90
</p>
91
-
<h3id="total-zero-errors">Total packages with Swift 6 zero data-race safety errors</h3>
92
-
<p>Packages with zero data-race safety compiler diagnostics during a successful build on at least one tested platform.</p>
91
+
<h3id="total-zero-errors">Total packages with Swift 6 zero datarace safety errors</h3>
92
+
<p>This chart shows packages with zero datarace safety compiler diagnostics during a successful build on at least one tested platform.</p>
93
93
<p>Couldn’t load chart data.</p>
94
-
<h3id="total-errors">Total Swift 6 data-race safety errors</h3>
95
-
<p>The total number of all data-race safety diagnostics across
94
+
<h3id="total-errors">Total Swift 6 datarace safety errors</h3>
95
+
<p>This chart shows the total number of all datarace safety diagnostics across
<strong>Q: </strong>What is a “data race safety error”?
102
102
</p>
103
103
<p>
104
-
<strong>A: </strong>Swift 6 introduces complete concurrency checking, a compiler feature that checks your code for data-race safety. The number of data race safety errors reflects how many issues the compiler detected relating to these concurrency or data-race checks. The total errors chart plots the total number of these errors summed across all packages.
104
+
<strong>A: </strong>Swift 6 introduces complete concurrency checking, a compiler feature that checks your code for datarace safety. The number of data race safety errors reflects how many issues the compiler detected relating to these concurrency or datarace checks. The total errors chart plots the total number of these errors summed across all packages.
<code>xcodebuild</code> to achieve this by enabling all data race safety checks in the compiler.
115
115
</p>
116
116
<hrclass="minor"/>
117
+
<p>
118
+
<strong>Q: </strong>Are packages that show zero data race compiler diagnostics guaranteed to be safe from data race errors?
119
+
</p>
120
+
<p>
121
+
<strong>A: </strong>No. We gather data on data race safety from Swift compiler diagnostics with “complete” concurrency checks enabled. We can’t tell if the diagnostics produce zero errors due to a genuine lack of data race safety errors or whether errors have been suppressed using techniques like
122
+
<code>@unchecked Sendable</code>.
123
+
</p>
124
+
<hrclass="minor"/>
117
125
<p>
118
126
<strong>Q: </strong>Why use
119
127
<code>-strict-concurrency=complete</code> instead of
120
128
<code>-swift-version 6</code>?
121
129
</p>
122
130
<p>
123
-
<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
131
+
<strong>A: </strong>Datarace safety diagnostics are determined in different stages of the compiler. For example, type checking produces some datarace 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
124
132
<code>-swift-version 6</code> would show fewer errors than really exist across the package ecosystem.
0 commit comments