Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ The `.codegraph/config.json` file controls indexing:
# Linux (RHEL / Fedora)
sudo yum groupinstall "Development Tools"

# Linux (Arch / Arch-based)
sudo pacman -S base-devel python

# Then rebuild on any platform:
npm rebuild better-sqlite3

Expand Down
4 changes: 3 additions & 1 deletion __tests__/sqlite-backend.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('buildWasmFallbackBanner — fix-recipe content', () => {
expect(banner).toContain('5-10x slower');
expect(banner).toContain('xcode-select --install');
expect(banner).toContain('apt install build-essential');
expect(banner).toContain('pacman -S base-devel');
expect(banner).toContain('npm rebuild better-sqlite3');
expect(banner).toContain('npm install better-sqlite3 --save');
expect(banner).toContain('codegraph status');
Expand All @@ -44,8 +45,9 @@ describe('buildWasmFallbackBanner — fix-recipe content', () => {
});

describe('WASM_FALLBACK_FIX_RECIPE — single source of truth', () => {
it('mentions the three recovery commands', () => {
it('mentions the recovery commands', () => {
expect(WASM_FALLBACK_FIX_RECIPE).toContain('xcode-select --install');
expect(WASM_FALLBACK_FIX_RECIPE).toContain('pacman -S base-devel');
expect(WASM_FALLBACK_FIX_RECIPE).toContain('npm rebuild better-sqlite3');
expect(WASM_FALLBACK_FIX_RECIPE).toContain(
'npm install better-sqlite3 --save'
Expand Down
3 changes: 2 additions & 1 deletion src/db/sqlite-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type SqliteBackend = 'native' | 'wasm';
* stderr banner and the MCP status formatter.
*/
export const WASM_FALLBACK_FIX_RECIPE =
'`xcode-select --install` (macOS) or `apt install build-essential` (Debian/Ubuntu), ' +
'`xcode-select --install` (macOS), `apt install build-essential` (Debian/Ubuntu), or `pacman -S base-devel` (Arch), ' +
'then `npm rebuild better-sqlite3`, or `npm install better-sqlite3 --save` to force-include it.';

/**
Expand All @@ -55,6 +55,7 @@ export function buildWasmFallbackBanner(nativeError?: string): string {
'Fix on Linux:',
' sudo apt install build-essential python3 make # Debian/Ubuntu',
' # or: sudo yum groupinstall "Development Tools" # RHEL/Fedora',
' # or: sudo pacman -S base-devel python # Arch Linux',
' npm rebuild better-sqlite3',
'',
'Or force-include as a hard dependency on any platform:',
Expand Down