fix(apple): disclose untraversed cache dependencies in trace results

This commit is contained in:
morluto
2026-10-08 19:55:51 +08:00
parent fb999f84b8
commit 6b99236c36
2 changed files with 12 additions and 0 deletions
+3
View File
@@ -584,6 +584,9 @@ describe("shared cache resolution", () => {
]);
expect(trace.images.map(({ path }) => path)).toEqual([MAIN]);
expect(trace.coverage.status).toBe("complete");
expect(trace.limitations).toContainEqual(
expect.stringContaining("transitive dependencies were not traversed"),
);
expect(trace.limitations).toContainEqual(
expect.stringContaining(
"looked up only in the supplied dyld shared cache",
+9
View File
@@ -418,6 +418,15 @@ export const traceDylibLoading = async (
limitations: [
...DYLIB_RESOLUTION_LIMITATIONS,
...sharedCacheLimitations(request.sharedCache, unserved),
...(edges.some(
(edge) =>
edge.command !== "LC_LAZY_LOAD_DYLIB" &&
edge.candidates.some(({ outcome }) => outcome === "shared-cache"),
)
? [
"Cache-backed images are leaf references: their load commands and transitive dependencies were not traversed. Complete coverage describes the selected roots and in-root images, not a complete process-wide dependency graph. Use inspect_dyld_shared_cache with selected images to inspect cached load commands.",
]
: []),
...(environmentRoots.length === 0
? []
: [