(context: ResolutionContext)
| 1257 | * touch; see {@link pythonReopenScope}. Built fresh, not from the memo. |
| 1258 | */ |
| 1259 | export function pythonRootFingerprint(context: ResolutionContext): string { |
| 1260 | const index = buildPythonModuleIndex(context); |
| 1261 | if (index.files.size === 0) return ''; |
| 1262 | const hash = crypto.createHash('sha1'); |
| 1263 | hash.update([...index.projectRoots].sort().join('\n')); |
| 1264 | hash.update('\0'); |
| 1265 | hash.update([...index.localRoots].map(([root, reach]) => `${root}\t${reach}`).sort().join('\n')); |
| 1266 | return hash.digest('hex'); |
| 1267 | } |
| 1268 | |
| 1269 | /** |
| 1270 | * What a sync must re-open when Python files were added or removed but the |
no test coverage detected