diff --git a/src/domain/apple/dylibResolution.test.ts b/src/domain/apple/dylibResolution.test.ts index 93916825b..e69073bac 100644 --- a/src/domain/apple/dylibResolution.test.ts +++ b/src/domain/apple/dylibResolution.test.ts @@ -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", diff --git a/src/domain/apple/dylibResolution.ts b/src/domain/apple/dylibResolution.ts index dc47979fd..78f7872e2 100644 --- a/src/domain/apple/dylibResolution.ts +++ b/src/domain/apple/dylibResolution.ts @@ -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 ? [] : [