Skip to content

Commit c325c18

Browse files
committed
bugfix
1 parent 4221a84 commit c325c18

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

tools/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ _XCSCHEMES = [
6565
# colorDiagnostics
6666
"NO",
6767
# xcodeVersionActual
68-
"1520",
68+
"1540",
6969
# nonPreviewObjRoot
7070
"/Users/brentley/Library/Developer/Xcode/DerivedData/tools-exxvdkcaoxdlhndlfnwxqvucohsr/Build/Intermediates.noindex",
7171
# baseObjRoot

tools/calculate_output_groups/Models.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ enum Output {
6666
struct Config: Codable {
6767
struct Settings: Codable {
6868
let base: [String]
69-
var platforms: [String: Optional<[String]>]
69+
var platforms: [String: [String]?]
7070
}
7171

7272
let build: Settings?

tools/calculate_output_groups/OutputGroupsCalculator.swift

+12-8
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,16 @@ https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bu
144144
throw PreconditionError(message: "Settings not found for target/command combination: \(guid) / \(buildRequest.command)")
145145
}
146146

147+
var ids = settings.base
147148
for platform in allPlatformsToSearch(buildRequest.platform) {
148149
guard let platform = settings.platforms[platform] else { continue }
149-
for prefix in prefixes {
150-
for id in platform ?? settings.base {
151-
lines.append("\(target.label)\n\(prefix) \(id)")
152-
}
150+
// An explicit nil value in platforms indicates inheritence from base
151+
ids = platform ?? settings.base
152+
break
153+
}
154+
for prefix in prefixes {
155+
for id in ids {
156+
lines.append("\(target.label)\n\(prefix) \(id)")
153157
}
154158
}
155159
}
@@ -228,18 +232,18 @@ extension PIF.Target.BuildConfiguration {
228232
let platform = String(key.dropFirst(20).dropLast(2))
229233
if value == "$(BAZEL_TARGET_ID)" {
230234
// This value indicates that the provided platform inherits from the base build setting. Store nil for later processing.
231-
build?.platforms[platform] = nil
235+
build?.platforms[platform] = Optional<[String]>.none
232236
} else {
233-
build?.platforms[platform] = [value]
237+
build?.platforms[platform] = .some([value])
234238
}
235239
}
236240
if buildFiles != nil, key.starts(with: "BAZEL_COMPILE_TARGET_IDS[sdk=") {
237241
let platform = String(key.dropFirst(29).dropLast(2))
238242
if value == "$(BAZEL_COMPILE_TARGET_IDS)" {
239243
// This value indicates that the provided platform inherits from the base build setting. Store nil for later processing.
240-
buildFiles?.platforms[platform] = nil
244+
buildFiles?.platforms[platform] = Optional<[String]>.none
241245
} else {
242-
buildFiles?.platforms[platform] = compileTargetIds(value)
246+
buildFiles?.platforms[platform] = .some(compileTargetIds(value))
243247
}
244248
}
245249
}

0 commit comments

Comments
 (0)