Skip to content

Commit 56569cb

Browse files
andreinknvclaude
andcommitted
style(db): address two informational nits from reviewer pass on 69f7001
Both items came back APPROVE-with-info on the prior review and are pure cleanup — no behavior change, no API surface change. ## #1 — RHEL/Fedora step in WASM_FALLBACK_FIX_RECIPE constant The constant in `src/db/sqlite-adapter.ts` is documented as the "single source of truth" for the fix recipe shown in the MCP `Backend:` line, but it only listed macOS + Debian/Ubuntu paths. The multi-line `buildWasmFallbackBanner` and the README both already include the `yum groupinstall "Development Tools"` step for RHEL/Fedora; the constant was the lone surface missing it. Now appended so MCP-displayed guidance matches the other two surfaces on every supported platform. ## #2 — hoist inline `import('./db').SqliteBackend` to top-level `CodeGraph.getBackend()` was the only method in `src/index.ts` using the inline-import type form. Adding `SqliteBackend` to the existing `import { DatabaseConnection, getDatabasePath } from './db'` keeps the file consistent. No circular-import risk since `./db` already re-exports the type from `./db/sqlite-adapter`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 69f7001 commit 56569cb

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/db/sqlite-adapter.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ export type SqliteBackend = 'native' | 'wasm';
2828
* formatter so the recipe can't drift between surfaces.
2929
*/
3030
export const WASM_FALLBACK_FIX_RECIPE =
31-
'`xcode-select --install` (macOS) or `apt install build-essential` (Debian/Ubuntu), ' +
32-
'then `npm rebuild better-sqlite3`, or `npm install better-sqlite3 --save` to force-include it.';
31+
'`xcode-select --install` (macOS), `apt install build-essential` (Debian/Ubuntu), ' +
32+
'or `yum groupinstall "Development Tools"` (RHEL/Fedora), then `npm rebuild better-sqlite3`, ' +
33+
'or `npm install better-sqlite3 --save` to force-include it.';
3334

3435
/**
3536
* Multi-line banner shown to stderr when `createDatabase` falls back to

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
BuildContextOptions,
2424
FindRelevantContextOptions,
2525
} from './types';
26-
import { DatabaseConnection, getDatabasePath } from './db';
26+
import { DatabaseConnection, SqliteBackend, getDatabasePath } from './db';
2727
import { QueryBuilder } from './db/queries';
2828
import { loadConfig, saveConfig, createDefaultConfig } from './config';
2929
import {
@@ -1592,7 +1592,7 @@ export class CodeGraph {
15921592
* right backend even if other projects in the same process happen
15931593
* to be on a different one.
15941594
*/
1595-
getBackend(): import('./db').SqliteBackend {
1595+
getBackend(): SqliteBackend {
15961596
return this.db.getBackend();
15971597
}
15981598

0 commit comments

Comments
 (0)