(context: ResolutionContext)
| 993 | * touch; see {@link pythonReopenScope}. Built fresh, not from the memo. |
| 994 | */ |
| 995 | export function pythonRootFingerprint(context: ResolutionContext): string { |
| 996 | const index = buildPythonModuleIndex(context); |
| 997 | if (index.files.size === 0) return ''; |
| 998 | const hash = crypto.createHash('sha1'); |
| 999 | hash.update([...index.projectRoots].sort().join('\n')); |
| 1000 | hash.update('\0'); |
| 1001 | hash.update([...index.localRoots].map(([root, reach]) => `${root}\t${reach}`).sort().join('\n')); |
| 1002 | return hash.digest('hex'); |
| 1003 | } |
| 1004 | |
| 1005 | /** |
| 1006 | * What a sync must re-open when Python files were added or removed but the |
no test coverage detected