@@ -76,7 +76,14 @@ extension Artifacts
76
76
label = " \( language) module "
77
77
}
78
78
79
- print ( " Dumping symbols for module ' \( sources. module. id) ' ( \( label) ) " )
79
+ switch sources. module. id
80
+ {
81
+ case " _CertificateInternals " : // unbuildable, from swift-certificates 1.0.0
82
+ continue
83
+
84
+ case let name:
85
+ print ( " Dumping symbols for module ' \( name) ' ( \( label) ) " )
86
+ }
80
87
81
88
var arguments : [ String ] =
82
89
[
@@ -103,55 +110,47 @@ extension Artifacts
103
110
try await SystemProcess . init ( command: " swift " , arguments: arguments) ( )
104
111
}
105
112
106
- let blacklisted : Set < ModuleIdentifier > =
107
- [
108
- " CDispatch " , // too low-level
109
- " CFURLSessionInterface " , // too low-level
110
- " CFXMLInterface " , // too low-level
111
- " CoreFoundation " , // too low-level
112
- " Glibc " , // linux-gnu specific
113
- " SwiftGlibc " , // linux-gnu specific
114
- " SwiftOnoneSupport " , // contains no symbols
115
- " SwiftOverlayShims " , // too low-level
116
- " SwiftShims " , // contains no symbols
117
- " XCTest " , // site policy
118
- " _Builtin_intrinsics " , // contains only one symbol, free(_:)
119
- " _Builtin_stddef_max_align_t " , // contains only two symbols
120
- " _InternalStaticMirror " , // unbuildable
121
- " _InternalSwiftScan " , // unbuildable
122
- " _SwiftConcurrencyShims " , // contains only two symbols
123
- " std " , // unbuildable
124
- ]
125
-
126
113
var parts : [ ModuleIdentifier : [ SymbolGraphPart . ID ] ] = [ : ]
127
114
for part : Result < FilePath . Component , any Error > in output. path. directory
128
115
{
129
116
// We don’t want to *parse* the JSON yet to discover the culture,
130
117
// because the JSON can be very large, and parsing JSON is very
131
118
// expensive (compared to parsing BSON). So we trust that the file
132
119
// name is correct and indicates what is contained within the file.
133
- if let id: SymbolGraphPart . ID = . init( " \( try part. get ( ) ) " ) ,
134
- !blacklisted. contains ( id. namespace)
120
+ if let id: SymbolGraphPart . ID = . init( " \( try part. get ( ) ) " )
135
121
{
136
- parts [ id. culture, default: [ ] ] . append ( id)
122
+ switch id. namespace
123
+ {
124
+ case " CDispatch " , // too low-level
125
+ " CFURLSessionInterface " , // too low-level
126
+ " CFXMLInterface " , // too low-level
127
+ " CoreFoundation " , // too low-level
128
+ " Glibc " , // linux-gnu specific
129
+ " SwiftGlibc " , // linux-gnu specific
130
+ " SwiftOnoneSupport " , // contains no symbols
131
+ " SwiftOverlayShims " , // too low-level
132
+ " SwiftShims " , // contains no symbols
133
+ " XCTest " , // site policy
134
+ " _Builtin_intrinsics " , // contains only one symbol, free(_:)
135
+ " _Builtin_stddef_max_align_t " , // contains only two symbols
136
+ " _InternalStaticMirror " , // unbuildable
137
+ " _InternalSwiftScan " , // unbuildable
138
+ " _SwiftConcurrencyShims " , // contains only two symbols
139
+ " std " : // unbuildable
140
+ continue
141
+
142
+ default :
143
+ parts [ id. culture, default: [ ] ] . append ( id)
144
+ }
137
145
}
138
146
}
139
147
140
- return try modules. map
148
+ return modules. map
141
149
{
142
- let parts : [ SymbolGraphPart . ID ] ? = parts [ $0. module. id]
143
- if case . swift = $0. language,
144
- case nil = parts
145
- {
146
- throw Artifacts . CultureError. empty ( $0. module. id)
147
- }
148
- else
149
- {
150
- return . init( $0. module,
151
- articles: $0. articles,
152
- artifacts: output. path,
153
- parts: parts ?? [ ] )
154
- }
150
+ . init( $0. module,
151
+ articles: $0. articles,
152
+ artifacts: output. path,
153
+ parts: parts [ $0. module. id, default: [ ] ] )
155
154
}
156
155
}
157
156
}
0 commit comments