File tree 4 files changed +21
-2
lines changed
ExplicitModuleBuilds/InterModuleDependencies
4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,8 @@ typedef struct {
130
130
(* swiftscan_swift_binary_detail_get_module_doc_path )(swiftscan_module_details_t );
131
131
swiftscan_string_ref_t
132
132
(* swiftscan_swift_binary_detail_get_module_source_info_path )(swiftscan_module_details_t );
133
+ bool
134
+ (* swiftscan_swift_binary_detail_get_is_framework )(swiftscan_module_details_t );
133
135
134
136
//=== Swift Placeholder Module Details query APIs -------------------------===//
135
137
swiftscan_string_ref_t
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ public struct SwiftPrebuiltExternalModuleDetails: Codable {
141
141
public init ( compiledModulePath: TextualVirtualPath ,
142
142
moduleDocPath: TextualVirtualPath ? = nil ,
143
143
moduleSourceInfoPath: TextualVirtualPath ? = nil ,
144
- isFramework: Bool = false ) throws {
144
+ isFramework: Bool ) throws {
145
145
self . compiledModulePath = compiledModulePath
146
146
self . moduleDocPath = moduleDocPath
147
147
self . moduleSourceInfoPath = moduleSourceInfoPath
Original file line number Diff line number Diff line change @@ -200,9 +200,18 @@ private extension SwiftScan {
200
200
let moduleSourceInfoPath =
201
201
try getOptionalPathDetail ( from: moduleDetailsRef,
202
202
using: api. swiftscan_swift_binary_detail_get_module_source_info_path)
203
+
204
+ let isFramework : Bool
205
+ if hasBinarySwiftModuleIsFramework {
206
+ isFramework = api. swiftscan_swift_binary_detail_get_is_framework ( moduleDetailsRef)
207
+ } else {
208
+ isFramework = false
209
+ }
210
+
203
211
return try SwiftPrebuiltExternalModuleDetails ( compiledModulePath: compiledModulePath,
204
212
moduleDocPath: moduleDocPath,
205
- moduleSourceInfoPath: moduleSourceInfoPath)
213
+ moduleSourceInfoPath: moduleSourceInfoPath,
214
+ isFramework: isFramework)
206
215
}
207
216
208
217
/// Construct a `SwiftPlaceholderModuleDetails` from a `swiftscan_module_details_t` reference
Original file line number Diff line number Diff line change @@ -234,6 +234,10 @@ internal final class SwiftScan {
234
234
return resultGraphMap
235
235
}
236
236
237
+ @_spi ( Testing) public var hasBinarySwiftModuleIsFramework : Bool {
238
+ api. swiftscan_swift_binary_detail_get_is_framework != nil
239
+ }
240
+
237
241
@_spi ( Testing) public var canLoadStoreScannerCache : Bool {
238
242
api. swiftscan_scanner_cache_load != nil &&
239
243
api. swiftscan_scanner_cache_serialize != nil &&
@@ -370,6 +374,10 @@ private extension swiftscan_functions_t {
370
374
self . swiftscan_diagnostics_set_dispose =
371
375
try loadOptional ( " swiftscan_diagnostics_set_dispose " )
372
376
377
+ // isFramework on binary module dependencies
378
+ self . swiftscan_swift_binary_detail_get_is_framework =
379
+ try loadOptional ( " swiftscan_swift_binary_detail_get_is_framework " )
380
+
373
381
// MARK: Required Methods
374
382
func loadRequired< T> ( _ symbol: String ) throws -> T {
375
383
guard let sym: T = Loader . lookup ( symbol: symbol, in: swiftscan) else {
You can’t perform that action at this time.
0 commit comments