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

Function candidatePaths

src/extraction/kernel/loader.ts:107–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105let cached: KernelModule | null | undefined;
106
107function candidatePaths(): string[] {
108 const candidates: string[] = [];
109 if (process.env.CODEGRAPH_KERNEL_PATH) candidates.push(process.env.CODEGRAPH_KERNEL_PATH);
110 const packageRoot = path.resolve(__dirname, '..', '..', '..');
111 candidates.push(path.join(packageRoot, 'kernel', 'codegraph-kernel.node'));
112 candidates.push(
113 path.join(
114 packageRoot,
115 'codegraph-kernel',
116 'prebuilds',
117 `${process.platform}-${process.arch}`,
118 'codegraph-kernel.node'
119 )
120 );
121 return candidates;
122}
123
124/**
125 * Verify the binary speaks our wire contract: same ABI version and byte-equal

Callers 1

getKernelFunction · 0.85

Calls 3

pushMethod · 0.80
resolveMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected