Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Sources/SWBCore/BuildParameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public struct BuildParameters: Hashable, SerializableCodable, Sendable {
try container.encodeIfPresent(activeRunDestination, forKey: .activeRunDestination)
try container.encodeIfPresent(activeArchitecture, forKey: .activeArchitecture)
try container.encodeIfPresent(arena, forKey: .arena)
try container.encode(overrides, forKey: .overrides)
try container.encode(filterOverrides(overrides), forKey: .overrides)
try container.encode(commandLineOverrides, forKey: .commandLineOverrides)
try container.encodeIfPresent(commandLineConfigOverridesPath, forKey: .commandLineConfigOverridesPath)
try container.encode(commandLineConfigOverrides, forKey: .commandLineConfigOverrides)
Expand Down Expand Up @@ -228,7 +228,7 @@ public struct BuildParameters: Hashable, SerializableCodable, Sendable {
hasher.combine(activeRunDestination)
hasher.combine(activeArchitecture)
hasher.combine(arena)
hasher.combine(overrides)
hasher.combine(filterOverrides(overrides))
hasher.combine(commandLineOverrides)
hasher.combine(commandLineConfigOverridesPath)
hasher.combine(commandLineConfigOverrides)
Expand All @@ -237,6 +237,15 @@ public struct BuildParameters: Hashable, SerializableCodable, Sendable {
hasher.combine(toolchainOverride)
return hasher.finalize()
}

private func filterOverrides(_ overrides: [String: String]) -> [String: String] {
overrides.mapValues { value in
// Remove -v flag from the value to avoid rebuild
value.split(separator: " ")
.filter { $0 != "-v" }
.joined(separator: " ")
}
}
}

extension BuildParameters {
Expand Down