Avatar
omochimetaru 4/18/2024 2:37 PM
final class PackageStructureCommand: CustomLLBuildCommand { override func getSignature(_: SPMLLBuild.Command) -> [UInt8] { let encoder = JSONEncoder.makeWithDefaults() // Include build parameters and process env in the signature. var hash = Data() hash += try! encoder.encode(self.context.productsBuildParameters) hash += try! encoder.encode(self.context.toolsBuildParameters) hash += try! encoder.encode(ProcessEnv.vars) return [UInt8](hash) }
2:37 PM
これみる限りJSONが3個入ってるだけやな
2:38 PM
キーの順番もソートされてるっぽいから、diff取れそうだ