Skip to content

Commit 6c0190a

Browse files
committed
Wording tweaks, chart descriptions, and a couple more FAQ questions.
1 parent 29468de commit 6c0190a

File tree

1 file changed

+57
-11
lines changed

1 file changed

+57
-11
lines changed

Sources/App/Views/ReadyForSwift6/ReadyForSwift6Show+View.swift

Lines changed: 57 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,31 @@ extension ReadyForSwift6Show {
3838
override func content() -> Node<HTML.BodyContext> {
3939
.group(
4040
.h2("Ready for Swift 6"),
41-
.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."),
42-
.p(.text("For help migrating your code, see the "),
43-
.a(
44-
.href("https://example.com"),
45-
.text("Swift 6 language mode migration guide")
46-
),
47-
.text(" or the "),
48-
.a(
49-
.href("https://example.com"),
50-
.text("Swift 6 release blog post")
51-
)),
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."),
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+
// TODO: Comment back in when the URLs to the migration guide and/or launch post are available.
44+
// .p(
45+
// .text("For help migrating your code, see the "),
46+
// .a(
47+
// .href("https://example.com"),
48+
// .text("Swift 6 language mode migration guide")
49+
// ),
50+
// .text(" or the "),
51+
// .a(
52+
// .href("https://example.com"),
53+
// .text("Swift 6 release blog post")
54+
// )
55+
// ),
5256
.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."),
5357
.h3("Total packages compatible with Swift 6"),
58+
.p("Packages with zero data-race safety compiler diagnostics during a successful build on at least one tested platform."),
5459
model.readyForSwift6Chart(kind: .compatiblePackages),
5560
.h3("Total Swift 6 concurrency errors"),
61+
.p(
62+
.text("The total number of all data-race safety diagnostics across "),
63+
.em("all"),
64+
.text(" packages.")
65+
),
5666
model.readyForSwift6Chart(kind: .totalErrors),
5767
.h3("Frequently asked questions"),
5868
.p(
@@ -66,6 +76,42 @@ extension ReadyForSwift6Show {
6676
.hr(
6777
.class("minor")
6878
),
79+
.p(
80+
.strong(.text("Q: ")),
81+
.text("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?")
82+
),
83+
.p(
84+
.strong(.text("A: ")),
85+
.text("Yes. The builds that produce the results on this page have strict concurrency checking set to "),
86+
.code("complete"),
87+
.text(" to check for data race safety in Swift 6 language mode. We pass "),
88+
.code("-strict-concurrency=complete"),
89+
.text(" to either "),
90+
.code("swift build"),
91+
.text(" or "),
92+
.code("xcodebuild"),
93+
.text(".")
94+
),
95+
.hr(
96+
.class("minor")
97+
),
98+
.p(
99+
.strong(.text("Q: ")),
100+
.text("Why use "),
101+
.code("-strict-concurrency=complete"),
102+
.text(" instead of "),
103+
.code("-swift-version 6"),
104+
.text("?")
105+
),
106+
.p(
107+
.strong(.text("A: ")),
108+
.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 "),
109+
.code("-swift-version 6"),
110+
.text(" would show fewer errors than really exist across the package ecosystem.")
111+
),
112+
.hr(
113+
.class("minor")
114+
),
69115
.p(
70116
.strong(.text("Q: ")),
71117
.text("What does “total concurrency errors” mean?")

0 commit comments

Comments
 (0)