* The module-config files the index was resolved by, with a digest of each * (see `moduleConfigSnapshot`): every tsconfig / jsconfig this resolver read * (`extends` chains included), every go.mod, and the root's candidates * whether present or not, so one that appears is seen too. `previous
(previous: string | null, treeMoved = false)
| 3482 | * snapshot from before manifests counted has its members to learn too. |
| 3483 | */ |
| 3484 | getModuleConfigSnapshot(previous: string | null, treeMoved = false): ModuleConfigSnapshot { |
| 3485 | const was = parseModuleConfigSnapshot(previous); |
| 3486 | if (treeMoved || !('Cargo.toml' in was)) { |
| 3487 | this.cargoCrates = undefined; |
| 3488 | this.layoutIncludeDirs = undefined; |
| 3489 | this.readCargoCrates(); |
| 3490 | } |
| 3491 | const files = new Set<string>(this.moduleConfigFiles); |
| 3492 | for (const name of MODULE_CONFIG_ROOT_FILES) files.add(path.join(this.projectRoot, name)); |
| 3493 | for (const rel of Object.keys(was)) files.add(path.join(this.projectRoot, rel)); |
| 3494 | return moduleConfigSnapshot(this.projectRoot, files, was); |
| 3495 | } |
| 3496 | |
| 3497 | /** The Cargo workspace's crates, read from disk the first time; every member's manifest joins the snapshot. */ |
| 3498 | private readCargoCrates(): Map<string, string> { |
no test coverage detected