MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / pythonRootFingerprint

Function pythonRootFingerprint

src/resolution/import-resolver.ts:1013–1021  ·  view source on GitHub ↗
(context: ResolutionContext)

Source from the content-addressed store, hash-verified

1011 * touch; see {@link pythonReopenScope}. Built fresh, not from the memo.
1012 */
1013export function pythonRootFingerprint(context: ResolutionContext): string {
1014 const index = buildPythonModuleIndex(context);
1015 if (index.files.size === 0) return '';
1016 const hash = crypto.createHash('sha1');
1017 hash.update([...index.projectRoots].sort().join('\n'));
1018 hash.update('\0');
1019 hash.update([...index.localRoots].map(([root, reach]) => `${root}\t${reach}`).sort().join('\n'));
1020 return hash.digest('hex');
1021}
1022
1023/**
1024 * What a sync must re-open when Python files were added or removed but the

Callers 1

Calls 4

buildPythonModuleIndexFunction · 0.85
updateMethod · 0.80
mapMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected