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

Method refreshSynthesis

src/resolution/index.ts:3417–3433  ·  view source on GitHub ↗

Replace synthesis only after every base-resolution pass has finished.

(
    dbPath: string,
    onProgress?: (done: number, total: number) => void,
    backpressure?: () => Promise<void> | null
  )

Source from the content-addressed store, hash-verified

3415
3416 /** Replace synthesis only after every base-resolution pass has finished. */
3417 async refreshSynthesis(
3418 dbPath: string,
3419 onProgress?: (done: number, total: number) => void,
3420 backpressure?: () => Promise<void> | null
3421 ): Promise<number> {
3422 this.clearCaches();
3423 const stage = new SynthesisStage(dbPath);
3424 try {
3425 const fresh = new ReferenceResolver(this.projectRoot, stage.queries);
3426 const count = await synthesizeCallbackEdges(stage.queries, fresh.context, onProgress, null, backpressure);
3427 await stage.publish(backpressure);
3428 return count;
3429 } finally {
3430 stage.close();
3431 this.clearCaches();
3432 }
3433 }
3434
3435 /**
3436 * Digest of the package roots Python import resolution rests on (see

Callers 2

syncMethod · 0.80

Calls 4

clearCachesMethod · 0.95
publishMethod · 0.95
closeMethod · 0.95
synthesizeCallbackEdgesFunction · 0.90

Tested by

no test coverage detected