Skip to content

Commit 32b6d36

Browse files
John ButeJohn Bute
authored andcommitted
fixed verbosity causing rebuild issue
1 parent 3c541cc commit 32b6d36

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Sources/SWBCore/BuildParameters.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public struct BuildParameters: Hashable, SerializableCodable, Sendable {
191191
try container.encodeIfPresent(activeRunDestination, forKey: .activeRunDestination)
192192
try container.encodeIfPresent(activeArchitecture, forKey: .activeArchitecture)
193193
try container.encodeIfPresent(arena, forKey: .arena)
194-
try container.encode(overrides, forKey: .overrides)
194+
try container.encode(normalizedOverrides(overrides), forKey: .overrides)
195195
try container.encode(commandLineOverrides, forKey: .commandLineOverrides)
196196
try container.encodeIfPresent(commandLineConfigOverridesPath, forKey: .commandLineConfigOverridesPath)
197197
try container.encode(commandLineConfigOverrides, forKey: .commandLineConfigOverrides)
@@ -228,7 +228,7 @@ public struct BuildParameters: Hashable, SerializableCodable, Sendable {
228228
hasher.combine(activeRunDestination)
229229
hasher.combine(activeArchitecture)
230230
hasher.combine(arena)
231-
hasher.combine(overrides)
231+
hasher.combine(normalizedOverrides(overrides))
232232
hasher.combine(commandLineOverrides)
233233
hasher.combine(commandLineConfigOverridesPath)
234234
hasher.combine(commandLineConfigOverrides)
@@ -237,6 +237,15 @@ public struct BuildParameters: Hashable, SerializableCodable, Sendable {
237237
hasher.combine(toolchainOverride)
238238
return hasher.finalize()
239239
}
240+
241+
private func normalizedOverrides(_ overrides: [String: String]) -> [String: String] {
242+
overrides.mapValues { value in
243+
// Remove -v flag from the value to avoid rebuild
244+
value.split(separator: " ")
245+
.filter { $0 != "-v" }
246+
.joined(separator: " ")
247+
}
248+
}
240249
}
241250

242251
extension BuildParameters {

0 commit comments

Comments
 (0)