scip-cli 3.0.0__tar.gz → 3.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scip_cli-3.0.0 → scip_cli-3.1.0}/PKG-INFO +17 -40
- {scip_cli-3.0.0 → scip_cli-3.1.0}/README.md +16 -39
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/SKILL.md +2 -2
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/__init__.py +1 -1
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/__main__.py +3 -2
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/reindex.py +26 -16
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/constants.py +1 -9
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/incremental.py +2 -5
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/languages.py +4 -4
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/runners.py +11 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/ts_projects.py +2 -2
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/bench_fingerprint_smoke.py +1 -3
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/bench_incremental.py +9 -11
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/bench_incremental_gate.py +2 -4
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/smoke.local.example.json +1 -1
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_incremental_equivalence.py +1 -3
- scip_cli-3.1.0/tests/test_indexer_failure_message.py +29 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_reindex.py +121 -18
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_scope.py +6 -6
- scip_cli-3.0.0/docs/benchmarks.md +0 -188
- scip_cli-3.0.0/docs/incremental-reindex-roadmap.md +0 -76
- scip_cli-3.0.0/docs/port.md +0 -80
- scip_cli-3.0.0/docs/ports/conclusions.md +0 -424
- scip_cli-3.0.0/docs/ports/experiment-summary.md +0 -257
- scip_cli-3.0.0/docs/ports/go-experiment.md +0 -252
- scip_cli-3.0.0/docs/ports/go.md +0 -203
- scip_cli-3.0.0/docs/ports/plan.md +0 -161
- scip_cli-3.0.0/docs/ports/rust-experiment.md +0 -324
- scip_cli-3.0.0/docs/ports/rust.md +0 -264
- scip_cli-3.0.0/docs/ports/summary.md +0 -118
- scip_cli-3.0.0/docs/ports/zig-experiment.md +0 -333
- scip_cli-3.0.0/docs/ports/zig.md +0 -283
- {scip_cli-3.0.0 → scip_cli-3.1.0}/.agents/commands/migration-problems.md +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/.agents/rules/agent.mdc +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/.github/ISSUE_TEMPLATE/question.md +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/.github/pull_request_template.md +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/.github/workflows/ci.yml +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/.gitignore +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/.pre-commit-config.yaml +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/AGENTS.md +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/CODE_OF_CONDUCT.md +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/CONTRIBUTING.md +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/LICENSE +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/SECURITY.md +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/pyproject.toml +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/analyze/__init__.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/analyze/common.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/analyze/file.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/analyze/graph.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/analyze/live.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/analyze/project.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/analyze/sections.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/analyze/symbol.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/analyze/targets.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/cache.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/cli_args.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/__init__.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/analyze.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/code.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/deps.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/members.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/rdeps.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/refs.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/search.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/skill.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/commands/symbols.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/config.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/debug.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/discover.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/exclude.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/__init__.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/convert.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/core.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/document_upsert.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/git_delta.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/github_npm.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/orchestrate.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/performance.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/postprocess.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/shard_files.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/shards.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/source_discovery.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/indexing/typescript.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/merge.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/metadata.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/output.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/paths.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/project.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/queries.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/scip_tool.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/scope.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/session.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/smoke_config.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/source.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/sql.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/symbols.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/targets.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scip_cli/tsconfig.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/bench.sh +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/bench_incremental.sh +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/bench_incremental_gate.sh +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/bench_postprocess.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/build.sh +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/generate_incremental_bench_fixture.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/publish.sh +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/scripts/test.sh +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/__init__.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/analyze_db.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/bench_db.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/conftest.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/e2e_harness.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixture_catalog.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/package.json +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/alpha/src/index.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/alpha/src/util1.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/alpha/src/util2.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/alpha/src/util3.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/alpha/tsconfig.json +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/beta/src/index.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/beta/src/util1.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/beta/src/util2.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/beta/src/util3.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/beta/tsconfig.json +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/index.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/meta.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_00.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_01.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_02.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_03.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_04.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_05.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_06.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_07.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_08.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_09.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_10.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_11.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_12.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_13.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_14.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_15.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_16.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_17.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_18.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_19.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_20.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_21.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_22.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_23.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_24.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_25.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_26.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_27.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_28.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_29.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_30.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_31.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_32.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_33.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_34.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_35.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_36.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_37.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_38.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_39.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_40.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_41.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_42.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_43.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_44.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_45.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_46.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_47.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_48.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_49.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_50.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_51.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_52.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_53.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_54.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_55.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_56.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_57.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_58.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_59.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/bulk/tsconfig.json +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/gamma/src/index.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/gamma/src/util1.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/gamma/src/util2.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/gamma/src/util3.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/incremental-bench/packages/gamma/tsconfig.json +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/package.json +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/__tests__/fixtureOnly.spec.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/app/handler.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/config.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/consumer.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/dead.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/domain/i18n/en.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/domain/i18n/index.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/domain/i18n/useLocale.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/domain/labels/index.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/events/streamTypes.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/gateway/index.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/helper.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/hooks/useHookA.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/hooks/useHookB.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/hooks/useItems.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/index.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/integrations/inferenceClient.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/lib/handler.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/loaders/useInference.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/models/MutationAggregate.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/pages/panelPage.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/rules/applyRule.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/types/a.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/types/b.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/ui/Button.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/ui/LazyPanel.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/ui/buttonConsumer.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/ui/menuModule.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/user.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/widget.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/widgets/OrphanWidget.ts +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/tsconfig.json +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/incremental_equivalence.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/perf_util.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_analyze.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_analyze_graph.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_analyze_live.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_analyze_perf.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_bench_queries.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_cache.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_composability.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_config.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_discover.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_document_upsert.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_e2e.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_e2e_analyze_patterns.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_e2e_perf.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_exclude_globs.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_git_delta.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_incremental_shards.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_index_batching.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_index_performance.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_index_prune.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_indexer_env.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_indexer_fallback.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_merge.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_metadata.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_multi_symbol.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_pure_functions.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_python_index_integration.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_qualified_symbols.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_scip_tool.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_shard_files.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_source_discovery.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_sql.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_symbols_freq.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_targets.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_tsconfig.py +0 -0
- {scip_cli-3.0.0 → scip_cli-3.1.0}/tests/test_typescript_projects.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: scip-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: Fast code intelligence via SCIP indexes
|
|
5
5
|
Project-URL: Homepage, https://github.com/flesler/scip-cli
|
|
6
6
|
Author: Ariel Flesler
|
|
@@ -101,7 +101,8 @@ On **first index**, scip-cli runs language indexers and builds a SQLite cache. Y
|
|
|
101
101
|
|
|
102
102
|
Install `scip-cli` and run it. On first index, scip-cli will:
|
|
103
103
|
|
|
104
|
-
-
|
|
104
|
+
- Install `scip-typescript` from the [flesler/scip-typescript](https://github.com/flesler/scip-typescript) fork (`feat/partial-files`) when not on PATH — clones, `npm install`, and builds into `~/.cache/scip-cli/tools/github-npm/` (upstream npm does not ship partial `--files` yet)
|
|
105
|
+
- Download `scip-python` via `npx`, `scip-go` via `go install`, or `rust-analyzer` via `rustup` when not already on PATH
|
|
105
106
|
- Download the `scip` converter binary from [GitHub releases](https://github.com/scip-code/scip/releases) into `~/.cache/scip-cli/bin/` when not already on PATH
|
|
106
107
|
- Walk the repo for `tsconfig*.json` project roots (TypeScript monorepos), run `scip-typescript` per project (parallel by default), convert each partial index, then merge into one `index.db`
|
|
107
108
|
|
|
@@ -109,11 +110,12 @@ No `.scip-cli.json` required for discovery. Subsequent queries read the cached d
|
|
|
109
110
|
|
|
110
111
|
**Option B: Install indexers globally ahead of time**
|
|
111
112
|
|
|
112
|
-
Same indexing steps as Option A; this only avoids
|
|
113
|
+
Same indexing steps as Option A; this only avoids the first-run download/build:
|
|
113
114
|
|
|
114
115
|
```bash
|
|
115
|
-
# TypeScript/JavaScript indexer
|
|
116
|
-
|
|
116
|
+
# TypeScript/JavaScript indexer — fork with partial --files (required for incremental reindex)
|
|
117
|
+
git clone --depth 1 --branch feat/partial-files https://github.com/flesler/scip-typescript.git
|
|
118
|
+
cd scip-typescript && npm install --ignore-scripts && npm run build && npm install -g .
|
|
117
119
|
|
|
118
120
|
# Python indexer
|
|
119
121
|
npm install -g @sourcegraph/scip-python
|
|
@@ -154,7 +156,7 @@ scip-cli <command> [arguments]
|
|
|
154
156
|
- `deps <symbol|file>` - Find outbound dependencies (what a symbol or file calls) (`--path`, `--paths-only`)
|
|
155
157
|
- `members <symbol>` - List members of a class/interface (`--path`)
|
|
156
158
|
- `analyze [target]` - SQL health dashboards (`--limit`, `--per-check-limit`, `--priority`, `--check`, `--include-tests`). No target: project-wide; directory or file path; symbol name. See [Finding easy wins with `analyze`](#finding-easy-wins-with-analyze).
|
|
157
|
-
- `reindex` - Force re-indexing
|
|
159
|
+
- `reindex` - Force re-indexing (`--path`, `--tsconfig`, `--exclude`, `--fresh`, `--no-incremental`; incremental by default in git TS repos)
|
|
158
160
|
- `skill [path]` - Install or dump the SKILL.md
|
|
159
161
|
|
|
160
162
|
### Examples
|
|
@@ -222,7 +224,10 @@ scip-cli deps greet --paths-only | sort -u
|
|
|
222
224
|
3. Runs `scip-typescript` per project (in parallel when there are multiple projects; set `SCIP_CLI_INDEX_WORKERS=1` to force serial), `scip-python` for Python, `scip-go` for Go, or `rust-analyzer scip` for Rust
|
|
223
225
|
4. Converts each SCIP output to SQLite with `scip expt-convert`, then merges partial databases when needed
|
|
224
226
|
5. Caches the result in `~/.cache/scip-cli/projects/<dirname>-<hash>/index.db` (e.g. `my-monorepo-1a3f7a`)
|
|
225
|
-
6.
|
|
227
|
+
6. Compacts the database after each reindex (`VACUUM` + WAL checkpoint)
|
|
228
|
+
7. Subsequent queries are SQLite lookups against that cache (not re-indexing)
|
|
229
|
+
|
|
230
|
+
**Incremental reindex (TypeScript, v3.0+):** plain `scip-cli reindex` in a git worktree is incremental by default — reuses unchanged tsconfig shards via `shards/manifest.json` (`git_commit` + per-shard `tsconfig_digest`). Dirty shards reindex only changed files (git delta → importer closure → fork `--files`) and upsert into the live `index.db`. Use `--no-incremental` or `--fresh` for a full rebuild; `--unversioned` and non-git projects always full-reindex. Bench locally with `scripts/bench_incremental_gate.sh --branch fixture`.
|
|
226
231
|
|
|
227
232
|
## Configuration
|
|
228
233
|
|
|
@@ -249,27 +254,28 @@ Other environment variables:
|
|
|
249
254
|
|`SCIP_CLI_MAX_HEAP_MB`|Node heap for `scip-typescript` / `scip-python` (overrides `maxHeapMb` in config)|
|
|
250
255
|
|`SCIP_CLI_TS_INDEX_BATCH_SIZE`|Split large TS repos into multiple `scip-typescript` runs (default: all tsconfigs in one run)|
|
|
251
256
|
|`SCIP_CLI_MERGE_BATCH_SIZE`|SQLite ATTACH batch size when merging part DBs (max 9)|
|
|
257
|
+
|`SCIP_CLI_INDEX_TIMING`|`1` — per-phase `INDEX_TIMING:` lines on stderr during reindex|
|
|
252
258
|
|`SCIP_CLI_MAX_DEF_LINES`|Max definition lines in `code` output|
|
|
253
259
|
|`SCIP_CLI_DEBUG`|Log SQL queries to stderr|
|
|
254
260
|
|
|
255
|
-
**Version policy:** only the `scip` converter (`expt-convert`) is pinned to the 0.8.x release line because it defines the SQLite schema.
|
|
261
|
+
**Version policy:** only the `scip` converter (`expt-convert`) is pinned to the 0.8.x release line because it defines the SQLite schema. **TypeScript** uses [flesler/scip-typescript](https://github.com/flesler/scip-typescript) `feat/partial-files` (see `SCIP_TYPESCRIPT_NPX_PACKAGE` in `scip_cli/indexing/constants.py`) — auto-built when not on PATH; switch back to `@sourcegraph/scip-typescript` on npm once upstream merges `--files`. `scip-python` via `npx` at latest; `scip-go` via `go install @latest`. `rust-analyzer` installs via `rustup component add`.
|
|
256
262
|
|
|
257
263
|
Large monorepos (>10 tsconfig projects) log per-project progress to stderr during indexing; smaller repos stay quiet aside from the final `Indexed … (size)` line.
|
|
258
264
|
|
|
259
265
|
Scoped indexing without editing `.scip-cli.json`:
|
|
260
266
|
|
|
261
267
|
```bash
|
|
262
|
-
scip-cli reindex --path packages/
|
|
268
|
+
scip-cli reindex --path packages/core
|
|
263
269
|
scip-cli reindex --path packages/api --path packages/worker
|
|
264
270
|
scip-cli reindex --tsconfig 'apps/api/tsconfig.*.json'
|
|
265
271
|
scip-cli reindex --tsconfig tsconfig.app.json --tsconfig tsconfig.spec.json
|
|
266
272
|
scip-cli reindex --exclude '**/*.test.ts' '**/*.spec.ts'
|
|
267
273
|
scip-cli reindex --exclude # clear persisted excludes
|
|
268
274
|
scip-cli reindex --fresh # full index; clear metadata.json
|
|
269
|
-
scip-cli reindex --incremental
|
|
275
|
+
scip-cli reindex --no-incremental # full rebuild; clears shard manifest
|
|
270
276
|
```
|
|
271
277
|
|
|
272
|
-
`--path` limits which discovered tsconfig **directories** are indexed (prefix match, same idea as query `--path`). `--tsconfig` skips discovery and indexes those `tsconfig*.json` **files** (repeatable; globs are
|
|
278
|
+
`--path` limits which discovered tsconfig **directories** are indexed (prefix match, same idea as query `--path`). `--tsconfig` skips discovery and indexes those `tsconfig*.json` **files** (repeatable; globs are repo-relative to the detected project root — run from monorepo root or shorten the glob). File-based runs default to one `scip-typescript` process per file so each gets its own heap (`SCIP_CLI_TS_INDEX_BATCH_SIZE` still overrides). Cannot combine `--path` and `--tsconfig`. **TypeScript only** for `--path` and `--tsconfig`. Scope and exclude defaults are saved in `metadata.json` next to `index.db` and reused on later `reindex` runs; use `reindex --fresh` to clear them and restore a full index. `--exclude` updates the persisted exclude list (honored during incremental reindex too); a lone bare `--exclude` clears it. Incremental is the default in git TypeScript repos; `--no-incremental`, `--fresh`, `--unversioned`, or non-git force full reindex.
|
|
273
279
|
|
|
274
280
|
When a tsconfig (after `extends`) has `allowJs: true`, matching `.js`/`.jsx` files under that config's `include`/`files` are indexed too (same roots as `.ts`/`.tsx`). `allowJs: false` or unset leaves JavaScript out. JS-only repos with no `tsconfig.json` still use `--infer-tsconfig`.
|
|
275
281
|
|
|
@@ -338,35 +344,6 @@ Inspired by [scip-query](https://github.com/PlunderStruck/scip-query), scip-cli
|
|
|
338
344
|
|
|
339
345
|
The speedup comes from using optimized direct SQLite queries and cutting some nice but very slow goodies (like ts-morph).
|
|
340
346
|
|
|
341
|
-
## Architecture
|
|
342
|
-
|
|
343
|
-
```
|
|
344
|
-
scip_cli/
|
|
345
|
-
├── __init__.py
|
|
346
|
-
├── __main__.py # CLI entry point
|
|
347
|
-
├── cli_args.py # Shared argparse helpers
|
|
348
|
-
├── config.py # .scip-cli.json loader
|
|
349
|
-
├── discover.py # TypeScript project discovery
|
|
350
|
-
├── merge.py # SQLite index merging
|
|
351
|
-
├── scip_tool.py # scip binary download
|
|
352
|
-
├── sql.py # SQLite helpers
|
|
353
|
-
├── paths.py # --path scope filtering
|
|
354
|
-
├── project.py # Project root + language detection
|
|
355
|
-
├── cache.py # Index cache paths
|
|
356
|
-
├── metadata.py # Persisted reindex defaults (metadata.json)
|
|
357
|
-
├── scope.py # Scoped reindex helpers
|
|
358
|
-
├── debug.py # SCIP_CLI_DEBUG stderr helpers
|
|
359
|
-
├── indexing.py # SCIP index build + get_db
|
|
360
|
-
├── symbols.py # Symbol parsing and kinds
|
|
361
|
-
├── queries.py # Symbol/file SQL queries
|
|
362
|
-
├── source.py # Filesystem source reads
|
|
363
|
-
├── output.py # CLI formatting helpers
|
|
364
|
-
├── session.py # setup() and single-match resolution
|
|
365
|
-
├── targets.py # file-path heuristics (tests; analyze uses analyze/targets.py)
|
|
366
|
-
├── analyze/ # SQL dashboard queries (project/file/symbol)
|
|
367
|
-
└── commands/ # Subcommand implementations
|
|
368
|
-
```
|
|
369
|
-
|
|
370
347
|
## Development
|
|
371
348
|
|
|
372
349
|
```bash
|
|
@@ -80,7 +80,8 @@ On **first index**, scip-cli runs language indexers and builds a SQLite cache. Y
|
|
|
80
80
|
|
|
81
81
|
Install `scip-cli` and run it. On first index, scip-cli will:
|
|
82
82
|
|
|
83
|
-
-
|
|
83
|
+
- Install `scip-typescript` from the [flesler/scip-typescript](https://github.com/flesler/scip-typescript) fork (`feat/partial-files`) when not on PATH — clones, `npm install`, and builds into `~/.cache/scip-cli/tools/github-npm/` (upstream npm does not ship partial `--files` yet)
|
|
84
|
+
- Download `scip-python` via `npx`, `scip-go` via `go install`, or `rust-analyzer` via `rustup` when not already on PATH
|
|
84
85
|
- Download the `scip` converter binary from [GitHub releases](https://github.com/scip-code/scip/releases) into `~/.cache/scip-cli/bin/` when not already on PATH
|
|
85
86
|
- Walk the repo for `tsconfig*.json` project roots (TypeScript monorepos), run `scip-typescript` per project (parallel by default), convert each partial index, then merge into one `index.db`
|
|
86
87
|
|
|
@@ -88,11 +89,12 @@ No `.scip-cli.json` required for discovery. Subsequent queries read the cached d
|
|
|
88
89
|
|
|
89
90
|
**Option B: Install indexers globally ahead of time**
|
|
90
91
|
|
|
91
|
-
Same indexing steps as Option A; this only avoids
|
|
92
|
+
Same indexing steps as Option A; this only avoids the first-run download/build:
|
|
92
93
|
|
|
93
94
|
```bash
|
|
94
|
-
# TypeScript/JavaScript indexer
|
|
95
|
-
|
|
95
|
+
# TypeScript/JavaScript indexer — fork with partial --files (required for incremental reindex)
|
|
96
|
+
git clone --depth 1 --branch feat/partial-files https://github.com/flesler/scip-typescript.git
|
|
97
|
+
cd scip-typescript && npm install --ignore-scripts && npm run build && npm install -g .
|
|
96
98
|
|
|
97
99
|
# Python indexer
|
|
98
100
|
npm install -g @sourcegraph/scip-python
|
|
@@ -133,7 +135,7 @@ scip-cli <command> [arguments]
|
|
|
133
135
|
- `deps <symbol|file>` - Find outbound dependencies (what a symbol or file calls) (`--path`, `--paths-only`)
|
|
134
136
|
- `members <symbol>` - List members of a class/interface (`--path`)
|
|
135
137
|
- `analyze [target]` - SQL health dashboards (`--limit`, `--per-check-limit`, `--priority`, `--check`, `--include-tests`). No target: project-wide; directory or file path; symbol name. See [Finding easy wins with `analyze`](#finding-easy-wins-with-analyze).
|
|
136
|
-
- `reindex` - Force re-indexing
|
|
138
|
+
- `reindex` - Force re-indexing (`--path`, `--tsconfig`, `--exclude`, `--fresh`, `--no-incremental`; incremental by default in git TS repos)
|
|
137
139
|
- `skill [path]` - Install or dump the SKILL.md
|
|
138
140
|
|
|
139
141
|
### Examples
|
|
@@ -201,7 +203,10 @@ scip-cli deps greet --paths-only | sort -u
|
|
|
201
203
|
3. Runs `scip-typescript` per project (in parallel when there are multiple projects; set `SCIP_CLI_INDEX_WORKERS=1` to force serial), `scip-python` for Python, `scip-go` for Go, or `rust-analyzer scip` for Rust
|
|
202
204
|
4. Converts each SCIP output to SQLite with `scip expt-convert`, then merges partial databases when needed
|
|
203
205
|
5. Caches the result in `~/.cache/scip-cli/projects/<dirname>-<hash>/index.db` (e.g. `my-monorepo-1a3f7a`)
|
|
204
|
-
6.
|
|
206
|
+
6. Compacts the database after each reindex (`VACUUM` + WAL checkpoint)
|
|
207
|
+
7. Subsequent queries are SQLite lookups against that cache (not re-indexing)
|
|
208
|
+
|
|
209
|
+
**Incremental reindex (TypeScript, v3.0+):** plain `scip-cli reindex` in a git worktree is incremental by default — reuses unchanged tsconfig shards via `shards/manifest.json` (`git_commit` + per-shard `tsconfig_digest`). Dirty shards reindex only changed files (git delta → importer closure → fork `--files`) and upsert into the live `index.db`. Use `--no-incremental` or `--fresh` for a full rebuild; `--unversioned` and non-git projects always full-reindex. Bench locally with `scripts/bench_incremental_gate.sh --branch fixture`.
|
|
205
210
|
|
|
206
211
|
## Configuration
|
|
207
212
|
|
|
@@ -228,27 +233,28 @@ Other environment variables:
|
|
|
228
233
|
|`SCIP_CLI_MAX_HEAP_MB`|Node heap for `scip-typescript` / `scip-python` (overrides `maxHeapMb` in config)|
|
|
229
234
|
|`SCIP_CLI_TS_INDEX_BATCH_SIZE`|Split large TS repos into multiple `scip-typescript` runs (default: all tsconfigs in one run)|
|
|
230
235
|
|`SCIP_CLI_MERGE_BATCH_SIZE`|SQLite ATTACH batch size when merging part DBs (max 9)|
|
|
236
|
+
|`SCIP_CLI_INDEX_TIMING`|`1` — per-phase `INDEX_TIMING:` lines on stderr during reindex|
|
|
231
237
|
|`SCIP_CLI_MAX_DEF_LINES`|Max definition lines in `code` output|
|
|
232
238
|
|`SCIP_CLI_DEBUG`|Log SQL queries to stderr|
|
|
233
239
|
|
|
234
|
-
**Version policy:** only the `scip` converter (`expt-convert`) is pinned to the 0.8.x release line because it defines the SQLite schema.
|
|
240
|
+
**Version policy:** only the `scip` converter (`expt-convert`) is pinned to the 0.8.x release line because it defines the SQLite schema. **TypeScript** uses [flesler/scip-typescript](https://github.com/flesler/scip-typescript) `feat/partial-files` (see `SCIP_TYPESCRIPT_NPX_PACKAGE` in `scip_cli/indexing/constants.py`) — auto-built when not on PATH; switch back to `@sourcegraph/scip-typescript` on npm once upstream merges `--files`. `scip-python` via `npx` at latest; `scip-go` via `go install @latest`. `rust-analyzer` installs via `rustup component add`.
|
|
235
241
|
|
|
236
242
|
Large monorepos (>10 tsconfig projects) log per-project progress to stderr during indexing; smaller repos stay quiet aside from the final `Indexed … (size)` line.
|
|
237
243
|
|
|
238
244
|
Scoped indexing without editing `.scip-cli.json`:
|
|
239
245
|
|
|
240
246
|
```bash
|
|
241
|
-
scip-cli reindex --path packages/
|
|
247
|
+
scip-cli reindex --path packages/core
|
|
242
248
|
scip-cli reindex --path packages/api --path packages/worker
|
|
243
249
|
scip-cli reindex --tsconfig 'apps/api/tsconfig.*.json'
|
|
244
250
|
scip-cli reindex --tsconfig tsconfig.app.json --tsconfig tsconfig.spec.json
|
|
245
251
|
scip-cli reindex --exclude '**/*.test.ts' '**/*.spec.ts'
|
|
246
252
|
scip-cli reindex --exclude # clear persisted excludes
|
|
247
253
|
scip-cli reindex --fresh # full index; clear metadata.json
|
|
248
|
-
scip-cli reindex --incremental
|
|
254
|
+
scip-cli reindex --no-incremental # full rebuild; clears shard manifest
|
|
249
255
|
```
|
|
250
256
|
|
|
251
|
-
`--path` limits which discovered tsconfig **directories** are indexed (prefix match, same idea as query `--path`). `--tsconfig` skips discovery and indexes those `tsconfig*.json` **files** (repeatable; globs are
|
|
257
|
+
`--path` limits which discovered tsconfig **directories** are indexed (prefix match, same idea as query `--path`). `--tsconfig` skips discovery and indexes those `tsconfig*.json` **files** (repeatable; globs are repo-relative to the detected project root — run from monorepo root or shorten the glob). File-based runs default to one `scip-typescript` process per file so each gets its own heap (`SCIP_CLI_TS_INDEX_BATCH_SIZE` still overrides). Cannot combine `--path` and `--tsconfig`. **TypeScript only** for `--path` and `--tsconfig`. Scope and exclude defaults are saved in `metadata.json` next to `index.db` and reused on later `reindex` runs; use `reindex --fresh` to clear them and restore a full index. `--exclude` updates the persisted exclude list (honored during incremental reindex too); a lone bare `--exclude` clears it. Incremental is the default in git TypeScript repos; `--no-incremental`, `--fresh`, `--unversioned`, or non-git force full reindex.
|
|
252
258
|
|
|
253
259
|
When a tsconfig (after `extends`) has `allowJs: true`, matching `.js`/`.jsx` files under that config's `include`/`files` are indexed too (same roots as `.ts`/`.tsx`). `allowJs: false` or unset leaves JavaScript out. JS-only repos with no `tsconfig.json` still use `--infer-tsconfig`.
|
|
254
260
|
|
|
@@ -317,35 +323,6 @@ Inspired by [scip-query](https://github.com/PlunderStruck/scip-query), scip-cli
|
|
|
317
323
|
|
|
318
324
|
The speedup comes from using optimized direct SQLite queries and cutting some nice but very slow goodies (like ts-morph).
|
|
319
325
|
|
|
320
|
-
## Architecture
|
|
321
|
-
|
|
322
|
-
```
|
|
323
|
-
scip_cli/
|
|
324
|
-
├── __init__.py
|
|
325
|
-
├── __main__.py # CLI entry point
|
|
326
|
-
├── cli_args.py # Shared argparse helpers
|
|
327
|
-
├── config.py # .scip-cli.json loader
|
|
328
|
-
├── discover.py # TypeScript project discovery
|
|
329
|
-
├── merge.py # SQLite index merging
|
|
330
|
-
├── scip_tool.py # scip binary download
|
|
331
|
-
├── sql.py # SQLite helpers
|
|
332
|
-
├── paths.py # --path scope filtering
|
|
333
|
-
├── project.py # Project root + language detection
|
|
334
|
-
├── cache.py # Index cache paths
|
|
335
|
-
├── metadata.py # Persisted reindex defaults (metadata.json)
|
|
336
|
-
├── scope.py # Scoped reindex helpers
|
|
337
|
-
├── debug.py # SCIP_CLI_DEBUG stderr helpers
|
|
338
|
-
├── indexing.py # SCIP index build + get_db
|
|
339
|
-
├── symbols.py # Symbol parsing and kinds
|
|
340
|
-
├── queries.py # Symbol/file SQL queries
|
|
341
|
-
├── source.py # Filesystem source reads
|
|
342
|
-
├── output.py # CLI formatting helpers
|
|
343
|
-
├── session.py # setup() and single-match resolution
|
|
344
|
-
├── targets.py # file-path heuristics (tests; analyze uses analyze/targets.py)
|
|
345
|
-
├── analyze/ # SQL dashboard queries (project/file/symbol)
|
|
346
|
-
└── commands/ # Subcommand implementations
|
|
347
|
-
```
|
|
348
|
-
|
|
349
326
|
## Development
|
|
350
327
|
|
|
351
328
|
```bash
|
|
@@ -123,7 +123,7 @@ Priority **high → medium → low**. `--limit` = total finding rows (default 20
|
|
|
123
123
|
### reindex
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
|
-
reindex [--path DIR ...] [--tsconfig GLOB ...] [--exclude [GLOB ...]] [--fresh] [--incremental] [--unversioned] [--with-external]
|
|
126
|
+
reindex [--path DIR ...] [--tsconfig GLOB ...] [--exclude [GLOB ...]] [--fresh] [--no-incremental] [--unversioned] [--with-external]
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
`--path` and `--tsconfig` are TS-only and mutually exclusive. `--tsconfig` globs expanded in-tool; one heap per file by default (`SCIP_CLI_TS_INDEX_BATCH_SIZE` overrides). Scope/exclude persist in `metadata.json`.
|
|
@@ -132,4 +132,4 @@ reindex [--path DIR ...] [--tsconfig GLOB ...] [--exclude [GLOB ...]] [--fresh]
|
|
|
132
132
|
|
|
133
133
|
`--fresh` clears persisted metadata (unless combined with scope flags on same command).
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
**Incremental by default** in git TypeScript repos: reuses `shards/manifest.json` (`git_commit` + per-shard `tsconfig_digest`); skips clean shards. Dirty: git delta ∪ importer closure → fork `--files` → upsert live `index.db`; deletions remove documents. `--no-incremental` or `--fresh` forces full reindex and clears the manifest. Non-git, `--unversioned`, or non-TypeScript projects always full-reindex.
|
|
@@ -196,10 +196,11 @@ def main() -> None:
|
|
|
196
196
|
help="Ignore persisted metadata.json; clear it unless scope/exclude flags are set on this run",
|
|
197
197
|
)
|
|
198
198
|
reindex_parser.add_argument(
|
|
199
|
-
"--incremental",
|
|
199
|
+
"--no-incremental",
|
|
200
200
|
action="store_true",
|
|
201
201
|
help=(
|
|
202
|
-
"
|
|
202
|
+
"Full reindex every shard and clear the shard manifest "
|
|
203
|
+
"(default: incremental in git TypeScript repos; --fresh also forces full)"
|
|
203
204
|
),
|
|
204
205
|
)
|
|
205
206
|
reindex_parser.add_argument(
|
|
@@ -20,6 +20,24 @@ from ..sql import finalize_index_db
|
|
|
20
20
|
from ..tsconfig import expand_tsconfig_patterns
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
def _resolve_incremental(
|
|
24
|
+
root,
|
|
25
|
+
lang,
|
|
26
|
+
*,
|
|
27
|
+
fresh: bool,
|
|
28
|
+
no_incremental: bool,
|
|
29
|
+
unversioned: bool,
|
|
30
|
+
) -> bool:
|
|
31
|
+
"""Incremental reindex when eligible; full reindex otherwise."""
|
|
32
|
+
if fresh or no_incremental:
|
|
33
|
+
return False
|
|
34
|
+
if lang != Language.TYPESCRIPT:
|
|
35
|
+
return False
|
|
36
|
+
if unversioned or index_unversioned(root):
|
|
37
|
+
return False
|
|
38
|
+
return is_versioned_repo(root)
|
|
39
|
+
|
|
40
|
+
|
|
23
41
|
def main(args):
|
|
24
42
|
root, lang = find_project_root_and_language()
|
|
25
43
|
if not root:
|
|
@@ -30,23 +48,15 @@ def main(args):
|
|
|
30
48
|
tsconfig_args = getattr(args, "tsconfig", None) or []
|
|
31
49
|
exclude_groups = getattr(args, "exclude", None)
|
|
32
50
|
fresh = getattr(args, "fresh", False)
|
|
33
|
-
|
|
51
|
+
no_incremental = getattr(args, "no_incremental", False)
|
|
34
52
|
unversioned = getattr(args, "unversioned", False)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
print(
|
|
43
|
-
(
|
|
44
|
-
"Error: reindex --incremental requires a git repository "
|
|
45
|
-
"(use full reindex without --incremental for --unversioned or non-git projects)"
|
|
46
|
-
),
|
|
47
|
-
file=sys.stderr,
|
|
48
|
-
)
|
|
49
|
-
sys.exit(1)
|
|
53
|
+
incremental = _resolve_incremental(
|
|
54
|
+
root,
|
|
55
|
+
lang,
|
|
56
|
+
fresh=fresh,
|
|
57
|
+
no_incremental=no_incremental,
|
|
58
|
+
unversioned=unversioned,
|
|
59
|
+
)
|
|
50
60
|
if path_args and tsconfig_args:
|
|
51
61
|
print("Error: reindex --path and --tsconfig cannot be combined", file=sys.stderr)
|
|
52
62
|
sys.exit(1)
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Indexing constants."""
|
|
2
2
|
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
3
|
INDEX_TIMEOUT = 300
|
|
6
4
|
DEFAULT_MAX_HEAP_MB = 8192
|
|
7
5
|
PROGRESS_LOG_MIN_PROJECTS = 10
|
|
@@ -12,15 +10,9 @@ SCIP_INSTALL_URL = "https://github.com/scip-code/scip/releases"
|
|
|
12
10
|
#
|
|
13
11
|
# TODO: Remove github_npm.py and runners github: branch when switching back to upstream npm.
|
|
14
12
|
# scip-typescript npx fallback (when the binary is not on PATH). Fork adds --files
|
|
15
|
-
# for partial document indexing
|
|
13
|
+
# for partial document indexing. Pin >= ce6e9c9.
|
|
16
14
|
SCIP_TYPESCRIPT_NPX_PACKAGE = "github:flesler/scip-typescript#feat/partial-files"
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
def file_incremental_enabled() -> bool:
|
|
20
|
-
"""Partial reindex via fork --files (default on)."""
|
|
21
|
-
return os.environ.get("SCIP_CLI_FILE_INCREMENTAL", "1").lower() not in {"0", "false", "no"}
|
|
22
|
-
|
|
23
|
-
|
|
24
16
|
# scip-typescript accepts many tsconfig paths per invocation (one .scip, one convert, no merge).
|
|
25
17
|
# Split only when SCIP_CLI_TS_INDEX_BATCH_SIZE is set (OOM/timeout tuning).
|
|
26
18
|
DEFAULT_TS_INDEX_BATCH_SIZE = None
|
|
@@ -10,7 +10,6 @@ from pathlib import Path
|
|
|
10
10
|
|
|
11
11
|
from ..cache import index_db_path
|
|
12
12
|
from ..debug import debug_log
|
|
13
|
-
from .constants import file_incremental_enabled
|
|
14
13
|
from .document_upsert import document_paths_in_db, remove_documents_by_paths, upsert_shard_documents
|
|
15
14
|
from .git_delta import (
|
|
16
15
|
GitIndexDelta,
|
|
@@ -20,7 +19,7 @@ from .git_delta import (
|
|
|
20
19
|
shard_dirty_paths,
|
|
21
20
|
)
|
|
22
21
|
from .orchestrate import batch_projects, finalize_part_dbs, index_workers, project_batch_label
|
|
23
|
-
from .performance import flush_summary, metric,
|
|
22
|
+
from .performance import flush_summary, metric, phase
|
|
24
23
|
from .shard_files import PartialReindexPlan, resolve_partial_reindex_plan, shard_relative_paths
|
|
25
24
|
from .shards import (
|
|
26
25
|
load_manifest_data,
|
|
@@ -88,7 +87,7 @@ def _index_dirty_shard(
|
|
|
88
87
|
) -> tuple[str, ShardUpdate | None, str | None]:
|
|
89
88
|
project = batch[0]
|
|
90
89
|
partial: PartialReindexPlan | None = None
|
|
91
|
-
if
|
|
90
|
+
if delta is not None:
|
|
92
91
|
partial = resolve_partial_reindex_plan(
|
|
93
92
|
root,
|
|
94
93
|
project,
|
|
@@ -97,8 +96,6 @@ def _index_dirty_shard(
|
|
|
97
96
|
delta,
|
|
98
97
|
exclude_globs=exclude_globs,
|
|
99
98
|
)
|
|
100
|
-
elif not file_incremental_enabled():
|
|
101
|
-
note(f"{shard_key(project)}:partial_off")
|
|
102
99
|
|
|
103
100
|
if partial is not None and not partial.index_paths and not partial.remove_paths:
|
|
104
101
|
return (
|
|
@@ -6,7 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
|
|
7
7
|
from .convert import convert_scip_to_db
|
|
8
8
|
from .orchestrate import project_label
|
|
9
|
-
from .runners import run_indexer_with_fallback
|
|
9
|
+
from .runners import indexer_failure_message, run_indexer_with_fallback
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def _project_cwd(root: Path, project: Path) -> Path:
|
|
@@ -29,7 +29,7 @@ def index_python_project(root, project, work_dir, env, *, output_db=None, exclud
|
|
|
29
29
|
npx_package="@sourcegraph/scip-python",
|
|
30
30
|
)
|
|
31
31
|
if result.returncode != 0:
|
|
32
|
-
return label, None, result
|
|
32
|
+
return label, None, indexer_failure_message(result)
|
|
33
33
|
try:
|
|
34
34
|
convert_scip_to_db(part_scip, db_path, document_path_prefix=project, exclude_globs=exclude_globs)
|
|
35
35
|
finally:
|
|
@@ -53,7 +53,7 @@ def index_golang_module(root, module, work_dir, env, *, output_db=None, exclude_
|
|
|
53
53
|
go_package="github.com/scip-code/scip-go/cmd/scip-go",
|
|
54
54
|
)
|
|
55
55
|
if result.returncode != 0:
|
|
56
|
-
return label, None, result
|
|
56
|
+
return label, None, indexer_failure_message(result)
|
|
57
57
|
try:
|
|
58
58
|
convert_scip_to_db(part_scip, db_path, document_path_prefix=module, exclude_globs=exclude_globs)
|
|
59
59
|
finally:
|
|
@@ -77,7 +77,7 @@ def index_rust_crate(root, crate, work_dir, env, *, output_db=None, exclude_glob
|
|
|
77
77
|
rustup_component="rust-analyzer",
|
|
78
78
|
)
|
|
79
79
|
if result.returncode != 0:
|
|
80
|
-
return label, None, result
|
|
80
|
+
return label, None, indexer_failure_message(result)
|
|
81
81
|
try:
|
|
82
82
|
convert_scip_to_db(part_scip, db_path, document_path_prefix=crate, exclude_globs=exclude_globs)
|
|
83
83
|
finally:
|
|
@@ -11,6 +11,17 @@ from ..debug import debug_log
|
|
|
11
11
|
from .constants import INDEX_TIMEOUT
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
def indexer_failure_message(result: subprocess.CompletedProcess[str]) -> str:
|
|
15
|
+
"""Best-effort detail when an indexer subprocess exits non-zero."""
|
|
16
|
+
stderr = (result.stderr or "").strip()
|
|
17
|
+
if stderr:
|
|
18
|
+
return stderr
|
|
19
|
+
stdout = (result.stdout or "").strip()
|
|
20
|
+
if stdout:
|
|
21
|
+
return stdout
|
|
22
|
+
return "indexing failed"
|
|
23
|
+
|
|
24
|
+
|
|
14
25
|
def run_subprocess(cmd, cwd, env=None):
|
|
15
26
|
"""Run subprocess with timeout; raise RuntimeError on timeout."""
|
|
16
27
|
try:
|
|
@@ -11,7 +11,7 @@ from .constants import SCIP_TYPESCRIPT_NPX_PACKAGE
|
|
|
11
11
|
from .convert import convert_scip_to_db
|
|
12
12
|
from .orchestrate import project_batch_label
|
|
13
13
|
from .performance import phase
|
|
14
|
-
from .runners import run_indexer_with_fallback
|
|
14
|
+
from .runners import indexer_failure_message, run_indexer_with_fallback
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def typescript_index_args(
|
|
@@ -96,7 +96,7 @@ def index_ts_projects(
|
|
|
96
96
|
npx_package=SCIP_TYPESCRIPT_NPX_PACKAGE,
|
|
97
97
|
)
|
|
98
98
|
if result.returncode != 0:
|
|
99
|
-
return label, None, result
|
|
99
|
+
return label, None, indexer_failure_message(result)
|
|
100
100
|
try:
|
|
101
101
|
with phase("scip_convert"):
|
|
102
102
|
convert_scip_to_db(
|
|
@@ -51,7 +51,7 @@ def _restore_snapshot(cache_dir: Path) -> None:
|
|
|
51
51
|
def _run_reindex(smoke_root: Path, env: dict[str, str]) -> tuple[float, str, str]:
|
|
52
52
|
t0 = time.perf_counter()
|
|
53
53
|
proc = subprocess.run(
|
|
54
|
-
["scip-cli", "reindex"
|
|
54
|
+
["scip-cli", "reindex"],
|
|
55
55
|
cwd=smoke_root,
|
|
56
56
|
capture_output=True,
|
|
57
57
|
text=True,
|
|
@@ -86,8 +86,6 @@ def _git_delta_scan(smoke_root: Path) -> float:
|
|
|
86
86
|
def bench_incremental(smoke_root: Path) -> None:
|
|
87
87
|
env = os.environ.copy()
|
|
88
88
|
env["SCIP_CLI_INDEX_TIMING"] = "1"
|
|
89
|
-
env["SCIP_CLI_FILE_INCREMENTAL"] = "1"
|
|
90
|
-
|
|
91
89
|
_restore_snapshot(get_cache_dir_from_root(smoke_root))
|
|
92
90
|
warm_wall, warm_line, warm_summary = _run_reindex(smoke_root, env)
|
|
93
91
|
delta_s = _git_delta_scan(smoke_root)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Benchmark reindex
|
|
2
|
+
"""Benchmark incremental reindex on the versioned multi-shard fixture.
|
|
3
3
|
|
|
4
4
|
Manual only — not part of pre-commit or scripts/test.sh. Requires Node.js + npx.
|
|
5
5
|
|
|
@@ -7,9 +7,7 @@ Manual only — not part of pre-commit or scripts/test.sh. Requires Node.js + np
|
|
|
7
7
|
scripts/bench_incremental.sh --baseline # save baseline
|
|
8
8
|
scripts/bench_incremental.sh --compare # diff against baseline
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
SCIP_CLI_FILE_INCREMENTAL=0 scripts/bench_incremental.sh # Phase 1 only
|
|
10
|
+
Incremental reindex is the default in git repos (shard skip + partial --files).
|
|
13
11
|
|
|
14
12
|
Dirty-file cases modify content (append), not mtime-only touch.
|
|
15
13
|
|
|
@@ -168,7 +166,7 @@ def run_benchmarks() -> list[BenchRow]:
|
|
|
168
166
|
_backup_touch_files(work_root)
|
|
169
167
|
rows: list[BenchRow] = []
|
|
170
168
|
|
|
171
|
-
seed = _bench_row(work_root, "seed_warm", [
|
|
169
|
+
seed = _bench_row(work_root, "seed_warm", [], note="build warm shard cache")
|
|
172
170
|
rows.append(seed)
|
|
173
171
|
_save_snapshot(cache)
|
|
174
172
|
|
|
@@ -182,22 +180,22 @@ def run_benchmarks() -> list[BenchRow]:
|
|
|
182
180
|
_reset_to_warm(work_root, cache)
|
|
183
181
|
rows.append(_bench_row(work_root, scenario, args, note=note, touch=touch))
|
|
184
182
|
|
|
185
|
-
bench("warm_all_cached", [
|
|
183
|
+
bench("warm_all_cached", [], note="no file changes")
|
|
186
184
|
bench(
|
|
187
185
|
"touch_small_shard",
|
|
188
|
-
[
|
|
186
|
+
[],
|
|
189
187
|
note="packages/alpha (~4 files)",
|
|
190
188
|
touch=TOUCH_SMALL,
|
|
191
189
|
)
|
|
192
190
|
bench(
|
|
193
191
|
"touch_large_shard",
|
|
194
|
-
[
|
|
192
|
+
[],
|
|
195
193
|
note=f"packages/bulk (~{len(list((FIXTURE_SOURCE / 'packages/bulk/src').rglob('*.ts')))} files)",
|
|
196
194
|
touch=TOUCH_LARGE,
|
|
197
195
|
)
|
|
198
196
|
bench(
|
|
199
197
|
"touch_small_and_large",
|
|
200
|
-
[
|
|
198
|
+
[],
|
|
201
199
|
note="alpha + bulk (2 shards)",
|
|
202
200
|
touch=TOUCH_BOTH,
|
|
203
201
|
)
|
|
@@ -208,7 +206,7 @@ def run_benchmarks() -> list[BenchRow]:
|
|
|
208
206
|
_bench_row(
|
|
209
207
|
work_root,
|
|
210
208
|
"cold_incremental",
|
|
211
|
-
[
|
|
209
|
+
[],
|
|
212
210
|
note="empty shard cache",
|
|
213
211
|
)
|
|
214
212
|
)
|
|
@@ -218,7 +216,7 @@ def run_benchmarks() -> list[BenchRow]:
|
|
|
218
216
|
_bench_row(
|
|
219
217
|
work_root,
|
|
220
218
|
"full_reindex",
|
|
221
|
-
[],
|
|
219
|
+
["--no-incremental"],
|
|
222
220
|
note="non-incremental baseline",
|
|
223
221
|
)
|
|
224
222
|
)
|
|
@@ -33,9 +33,7 @@ BENCH_DIR = ROOT / "tmp" / "benchmarks"
|
|
|
33
33
|
DECISIONS_PATH = BENCH_DIR / ".incremental-gate-decisions.json"
|
|
34
34
|
FIXTURE_SOURCE = ROOT / "tests" / "fixtures" / "incremental-bench"
|
|
35
35
|
|
|
36
|
-
BASE_ENV: dict[str, str] = {
|
|
37
|
-
"SCIP_CLI_FILE_INCREMENTAL": "1",
|
|
38
|
-
}
|
|
36
|
+
BASE_ENV: dict[str, str] = {}
|
|
39
37
|
|
|
40
38
|
FIXTURE_TOUCH_LARGE = ["packages/bulk/src/modules/module_25.ts"]
|
|
41
39
|
SMOKE_BASELINE_DIR = BENCH_DIR / "gate-smoke-baseline"
|
|
@@ -160,7 +158,7 @@ def _run_reindex(work_root: Path, env_overrides: dict[str, str]) -> tuple[float,
|
|
|
160
158
|
env.update(env_overrides)
|
|
161
159
|
t0 = time.perf_counter()
|
|
162
160
|
proc = subprocess.run(
|
|
163
|
-
["scip-cli", "reindex"
|
|
161
|
+
["scip-cli", "reindex"],
|
|
164
162
|
cwd=work_root,
|
|
165
163
|
capture_output=True,
|
|
166
164
|
text=True,
|
|
@@ -15,9 +15,7 @@ from scip_cli.indexing.typescript import index_typescript, typescript_projects
|
|
|
15
15
|
FIXTURE_SOURCE = Path(__file__).parent / "fixtures" / "incremental-bench"
|
|
16
16
|
FIXTURE_TOUCH_LARGE = "packages/bulk/src/modules/module_25.ts"
|
|
17
17
|
|
|
18
|
-
INCREMENTAL_ENV = {
|
|
19
|
-
"SCIP_CLI_FILE_INCREMENTAL": "1",
|
|
20
|
-
}
|
|
18
|
+
INCREMENTAL_ENV: dict[str, str] = {}
|
|
21
19
|
|
|
22
20
|
|
|
23
21
|
def _init_git(root: Path) -> None:
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Tests for indexer subprocess failure messaging."""
|
|
2
|
+
|
|
3
|
+
import subprocess
|
|
4
|
+
|
|
5
|
+
from scip_cli.indexing.runners import indexer_failure_message
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TestIndexerFailureMessage:
|
|
9
|
+
def test_prefers_stderr(self):
|
|
10
|
+
result = subprocess.CompletedProcess(
|
|
11
|
+
args=[],
|
|
12
|
+
returncode=1,
|
|
13
|
+
stdout="stdout detail",
|
|
14
|
+
stderr="stderr detail",
|
|
15
|
+
)
|
|
16
|
+
assert indexer_failure_message(result) == "stderr detail"
|
|
17
|
+
|
|
18
|
+
def test_falls_back_to_stdout_when_stderr_empty(self):
|
|
19
|
+
result = subprocess.CompletedProcess(
|
|
20
|
+
args=[],
|
|
21
|
+
returncode=1,
|
|
22
|
+
stdout="error: no files got indexed",
|
|
23
|
+
stderr="",
|
|
24
|
+
)
|
|
25
|
+
assert indexer_failure_message(result) == "error: no files got indexed"
|
|
26
|
+
|
|
27
|
+
def test_default_when_both_streams_empty(self):
|
|
28
|
+
result = subprocess.CompletedProcess(args=[], returncode=1, stdout="", stderr="")
|
|
29
|
+
assert indexer_failure_message(result) == "indexing failed"
|