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

Method refreshSynthesis

src/resolution/index.ts:3267–3283  ·  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

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

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