Skip to content

feat(scip): auto-install indexers and generate compile_commands.json for C/C++#211

Merged
jafreck merged 6 commits intomainfrom
feat/scip-auto-install
Mar 15, 2026
Merged

feat(scip): auto-install indexers and generate compile_commands.json for C/C++#211
jafreck merged 6 commits intomainfrom
feat/scip-auto-install

Conversation

@jafreck
Copy link
Owner

@jafreck jafreck commented Mar 15, 2026

Summary

Auto-install SCIP indexers and generate C/C++ compilation databases so users get rich code intelligence without manual setup.

Changes

SCIP indexer auto-install (src/scip/installer.ts)

  • Bundle @sourcegraph/scip-typescript and @sourcegraph/scip-python as npm dependencies
  • Auto-download scip-clang, scip-go, scip-ruby from GitHub releases to ~/.lore/bin/
  • Fall back to pip/gem/dotnet/coursier for language-specific package managers
  • Auto-install missing indexers during indexing on first use
  • New lore install-scip CLI command for explicit installation

Registry resolution (src/scip/registry.ts)

  • Check ~/.lore/bin/ (managed) and node_modules/.bin/ (npm-bundled) before system PATH
  • Use resolvedPath (full path) instead of bare command name for execFile

C/C++ compilation database generation (src/scip/compdb.ts)

  • Detect build systems: CMake, Meson, Make
  • Auto-generate compile_c- Auto-generate compile_c- Auto-generate compile_c- Auto-generate compilete- Auto-ge-co- Auto-generate compile_c- Auto-generate compile_c- Auto-generate compile_c- Auto-generate compilete- Auto-ge-co- Auto-romScipSymbolt- Auto-generatecompile_c- Auto-generate compile_c- nd- Auto-generate compile_c- Auto-generate compile_c- Auto-generate compile_c- Autrecogniz- Auto-generate compile_c- Auto-generate compile_c- Auto-generate compile_c- Auto-generad- Auto-generate compile_c- Auto-generate compile_c- Auto-generate compile (- Auto-generate compile_c- Auto-generate compile_c- Auto-- Auto-generatecompile_c- Auto-generate `compile_c- Auto-gd

############################################End-to-end verified on PostgreSQL: lore index --root postgres --language c automatically detects############################################End-to-end verified on Postgre,527 SCIP-resolved call refs in ~37 seconds with zero manual setup

  • parse_analyze_fixedparams callers now fully resolved: DefineView, pg_analyze_and_rewrite_fixedparams, post_parse_analyze_hook

Install status (lore install-scip)

Indexer Method Auto?
scip-typescript npm dependency
scip-python npm dependency
scip-clang GitHub binary
scip-go GitHub tarball
scip-ruby GitHub binary
scip-dotnet dotnet tool ✓ (if .NET installed)
scip-java coursier manual
rust-analyzer rustup manual

jafreck added 6 commits March 15, 2026 00:31
…skill (#210)

The lore-enabled benchmark arm was silently getting a dead MCP server
because findLoreProjectRoot() checked the cloned repo first. For
lore-self benchmarks the clone is at a pinned SHA (660be2b) that
predates the realpathSync entry-guard fix (ee708f8), so the old
server.js fails the /var vs /private/var check on macOS and main()
never runs.

Changes:
- findLoreProjectRoot() now resolves exclusively from import.meta.dirname
  (the current checkout), never from the cloned target repo. Throws if
  dist/server/server.js is missing instead of silently falling through.
- Remove redundant --deny-tool for control arm — the MCP isn't registered
  so lore_* tools simply don't exist.
- Remove token count estimator — use actual outputTokens from copilot
  NDJSON stream only.
- Add copilot-benchmark skill (.github/skills/copilot-benchmark/SKILL.md).
@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 73.30097% with 110 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.43%. Comparing base (6141936) to head (1c77945).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/scip/enrichment.ts 5.40% 35 Missing ⚠️
src/indexer/stages/scip-indexer.ts 74.54% 28 Missing ⚠️
src/scip/installer.ts 87.17% 20 Missing ⚠️
src/cli.ts 5.26% 18 Missing ⚠️
src/scip/compdb.ts 88.60% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #211      +/-   ##
==========================================
- Coverage   88.04%   87.43%   -0.61%     
==========================================
  Files          80       82       +2     
  Lines        9048     9429     +381     
  Branches     2798     2925     +127     
==========================================
+ Hits         7966     8244     +278     
- Misses       1082     1185     +103     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jafreck jafreck merged commit b39a1f3 into main Mar 15, 2026
3 checks passed
@jafreck jafreck mentioned this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant