Replace synthesis only after every base-resolution pass has finished.
(
dbPath: string,
onProgress?: (done: number, total: number) => void,
backpressure?: () => Promise<void> | null
)
| 3265 | |
| 3266 | /** Replace synthesis only after every base-resolution pass has finished. */ |
| 3267 | async refreshSynthesis( |
| 3268 | dbPath: string, |
| 3269 | onProgress?: (done: number, total: number) => void, |
| 3270 | backpressure?: () => Promise<void> | null |
| 3271 | ): Promise<number> { |
| 3272 | this.clearCaches(); |
| 3273 | const stage = new SynthesisStage(dbPath); |
| 3274 | try { |
| 3275 | const fresh = new ReferenceResolver(this.projectRoot, stage.queries); |
| 3276 | const count = await synthesizeCallbackEdges(stage.queries, fresh.context, onProgress, null, backpressure); |
| 3277 | await stage.publish(backpressure); |
| 3278 | return count; |
| 3279 | } finally { |
| 3280 | stage.close(); |
| 3281 | this.clearCaches(); |
| 3282 | } |
| 3283 | } |
| 3284 | |
| 3285 | /** |
| 3286 | * Digest of the package roots Python import resolution rests on (see |
no test coverage detected