mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 14:59:05 +00:00
refactor(native): share single-observation Mach-O UUID reconciliation (#17300)
This commit is contained in:
1 parent
d635408d63
commit
13ffe9b42f
1 file changed
+13
-18
@@ -183,28 +183,23 @@ const reconcileObservations = (
|
||||
],
|
||||
};
|
||||
}
|
||||
if (dwarfdump.kind === "valid" && loadUuid.kind === "conflict")
|
||||
return { value: null, limitations: [loadUuid.reason] };
|
||||
if (loadUuid.kind === "valid" && dwarfdump.kind === "conflict")
|
||||
return { value: null, limitations: [dwarfdump.reason] };
|
||||
if (dwarfdump.kind === "valid")
|
||||
const valid = dwarfdump.kind === "valid" ? dwarfdump : loadUuid;
|
||||
const other = dwarfdump.kind === "valid" ? loadUuid : dwarfdump;
|
||||
if (valid.kind === "valid") {
|
||||
if (other.kind === "conflict")
|
||||
return { value: null, limitations: [other.reason] };
|
||||
const source =
|
||||
dwarfdump.kind === "valid"
|
||||
? "dwarfdump UUID"
|
||||
: "binary load commands LC_UUID";
|
||||
return {
|
||||
value: dwarfdump.value,
|
||||
value: valid.value,
|
||||
limitations:
|
||||
loadUuid.kind === "invalid"
|
||||
? [`${loadUuid.reason}; using the unambiguous dwarfdump UUID.`]
|
||||
: [],
|
||||
};
|
||||
if (loadUuid.kind === "valid")
|
||||
return {
|
||||
value: loadUuid.value,
|
||||
limitations:
|
||||
dwarfdump.kind === "invalid"
|
||||
? [
|
||||
`${dwarfdump.reason}; using the unambiguous binary load commands LC_UUID.`,
|
||||
]
|
||||
other.kind === "invalid"
|
||||
? [`${other.reason}; using the unambiguous ${source}.`]
|
||||
: [],
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
value: null,
|
||||
|
||||
Reference in new issue
Block a user