Skip to content

Commit 4077320

Browse files
authored
Merge pull request #347 from tayloraswift/swift-6-stdlib
2 parents 4f7ac8b + e98566c commit 4077320

File tree

58 files changed

+889
-210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+889
-210
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,12 @@ jobs:
3939
--package-name swift-unidoc
4040
4141
macos:
42-
runs-on: macos-14
42+
runs-on: macos-15
4343
name: macOS
4444
env:
4545
UNIDOC_ENABLE_INDEXSTORE: "0"
4646

4747
steps:
48-
- name: Install Swift 6.0
49-
uses: tayloraswift/swift-install-action@master
50-
with:
51-
swift-prefix: "swift-6.0-release/xcode/swift-6.0-RELEASE"
52-
swift-id: "swift-6.0-RELEASE"
53-
5448
- name: Install Unidoc
5549
uses: tayloraswift/swift-unidoc-action@master
5650

.github/workflows/package.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@ on:
99

1010
jobs:
1111
macos:
12-
runs-on: macos-14
12+
runs-on: macos-15
1313
name: macOS
1414
steps:
15-
- name: Install Swift 6.0
16-
uses: tayloraswift/swift-install-action@master
17-
with:
18-
swift-prefix: "swift-6.0-release/xcode/swift-6.0-RELEASE"
19-
swift-id: "swift-6.0-RELEASE"
20-
2115
- name: Checkout repository
2216
uses: actions/checkout@v3
2317

.github/workflows/test.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,12 @@ jobs:
3737
/bin/bash .github/pipeline
3838
3939
macos:
40-
runs-on: macos-14
40+
runs-on: macos-15
4141
name: macOS
4242
env:
4343
UNIDOC_ENABLE_INDEXSTORE: "1"
4444

4545
steps:
46-
- name: Install Swift 6.0
47-
uses: tayloraswift/swift-install-action@master
48-
with:
49-
swift-prefix: "swift-6.0-release/xcode/swift-6.0-RELEASE"
50-
swift-id: "swift-6.0-RELEASE"
51-
5246
- name: Checkout repository
5347
uses: actions/checkout@v3
5448

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.testing
66
.unidoc
77
.vscode
8+
.DS_Store
89

910
unidoc/
1011
swiftpm/

Sources/Availability/Domains/Availability.PlatformDomain.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ extension Availability
55
@frozen public
66
enum PlatformDomain:String, CaseIterable, Equatable, Hashable, Sendable
77
{
8+
case bridgeOS
89
case iOS
910
case macOS
1011
case macCatalyst
@@ -37,6 +38,7 @@ extension Availability.PlatformDomain:CustomStringConvertible
3738
{
3839
switch self
3940
{
41+
case .bridgeOS: "bridgeOS"
4042
case .iOS: "iOS"
4143
case .macOS: "macOS"
4244
case .macCatalyst: "Mac Catalyst"

Sources/SourceDiagnostics/Emission/DiagnosticLevel.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ enum DiagnosticLevel:Equatable, Hashable, Comparable
44
case note
55
case warning
66
case error
7+
case fatal
78
}
89
extension DiagnosticLevel:CustomStringConvertible
910
{
@@ -15,6 +16,7 @@ extension DiagnosticLevel:CustomStringConvertible
1516
case .note: "note"
1617
case .warning: "warning"
1718
case .error: "error"
19+
case .fatal: "fatal"
1820
}
1921
}
2022
}
@@ -27,6 +29,7 @@ extension DiagnosticLevel
2729
case .note: .rgb(150, 150, 150)
2830
case .warning: .magenta
2931
case .error: .red
32+
case .fatal: .red
3033
}
3134
}
3235
}

Sources/SymbolGraphBuilder/Builds/SSGC.PackageBuild.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,7 @@ extension SSGC.PackageBuild
326326
throw SSGC.PackageBuildError.swift_build(code, invocation)
327327
}
328328

329-
let platform:SymbolGraphMetadata.Platform = try toolchain.platform()
330-
var packages:SSGC.PackageGraph = .init(platform: platform)
329+
var packages:SSGC.PackageGraph = .init(platform: try toolchain.platform())
331330

332331
for pin:SPM.DependencyPin in pins
333332
{
@@ -341,13 +340,17 @@ extension SSGC.PackageBuild
341340
packages.attach(manifest, as: pin.identity)
342341
}
343342

343+
let standardLibrary:SSGC.StandardLibrary = .init(platform: packages.platform,
344+
version: toolchain.splash.swift.version.minor)
345+
344346
let modules:SSGC.ModuleGraph = try packages.join(dependencies: pins,
347+
standardLibrary: standardLibrary,
345348
with: &manifest,
346349
as: self.id.package)
347350

348351
// Dump the standard library’s symbols, unless they’re already cached.
349352
let artifactsCached:FilePath.Directory = try toolchain.dump(
350-
standardLibrary: .init(platform: platform),
353+
standardLibrary: standardLibrary,
351354
cache: cache)
352355
for (module, include):(Symbol.Module, [FilePath.Directory]) in try self.modulesToDump(
353356
among: modules)

Sources/SymbolGraphBuilder/SSGC.Logger.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ extension SSGC.Logger:DiagnosticLogger
5050
}
5151

5252
case .ignoreErrors:
53-
break
53+
if messages.status >= .fatal
54+
{
55+
self.failed = true
56+
}
5457

5558
case .demoteErrors:
5659
messages.demoteErrors(to: .warning)

Sources/SymbolGraphBuilder/SSGC.PackageGraph.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ extension SSGC.PackageGraph
110110

111111
consuming
112112
func join(dependencies pins:[SPM.DependencyPin],
113+
standardLibrary:SSGC.StandardLibrary,
113114
with sinkManifest:inout SPM.Manifest,
114115
as id:Symbol.Package) throws -> SSGC.ModuleGraph
115116
{
@@ -144,8 +145,6 @@ extension SSGC.PackageGraph
144145
print("\(i + 1). \(package)")
145146
}
146147

147-
let standardLibrary:SSGC.StandardLibrary = .init(platform: self.platform)
148-
149148
return try .init(
150149
standardLibrary: standardLibrary.modules.map(SSGC.ModuleLayout.init(toolchain:)),
151150
sparseEdges: self.sparseEdges,

Sources/SymbolGraphBuilder/Sources/SSGC.DocumentationSources.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ extension SSGC.DocumentationSources
115115
{
116116
$0 + $1.declarations.reduce(0) { $0 + $1.decls.count }
117117
})
118+
re-exports : \(moduleIndexes.reduce(0) { $0 + $1.reexports.count })
118119
extensions : \(moduleIndexes.reduce(0) { $0 + $1.extensions.count })
119120
""")
120121
}
@@ -169,7 +170,11 @@ extension SSGC.DocumentationSources
169170
Linked documentation!
170171
time loading sources : \(profiler.loadingSources)
171172
time linking : \(profiler.linking)
172-
symbols : \(graph.decls.symbols.count)
173+
symbols : \(graph.decls.symbols.count)
174+
redirects : \
175+
\(graph.cultures.reduce(0) { $0 + $1.reexports.unhashed.count })
176+
redirects (hashed) : \
177+
\(graph.cultures.reduce(0) { $0 + $1.reexports.hashed.count })
173178
""")
174179

175180
return graph

0 commit comments

Comments
 (0)