@lzehrung/codegraph 3.0.1 → 3.1.0
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.
- package/README.md +17 -17
- package/codegraph-skill/codegraph/SKILL.md +3 -0
- package/dist/agent/artifact.d.ts.map +1 -1
- package/dist/agent/artifact.js +4 -9
- package/dist/agent/artifact.js.map +1 -1
- package/dist/agent/call-hierarchy.d.ts +4 -2
- package/dist/agent/call-hierarchy.d.ts.map +1 -1
- package/dist/agent/call-hierarchy.js +20 -29
- package/dist/agent/call-hierarchy.js.map +1 -1
- package/dist/agent/explain.d.ts.map +1 -1
- package/dist/agent/explain.js +12 -11
- package/dist/agent/explain.js.map +1 -1
- package/dist/agent/explore.d.ts.map +1 -1
- package/dist/agent/explore.js +2 -11
- package/dist/agent/explore.js.map +1 -1
- package/dist/agent/file-view.d.ts.map +1 -1
- package/dist/agent/file-view.js +4 -12
- package/dist/agent/file-view.js.map +1 -1
- package/dist/agent/normalize.d.ts +0 -3
- package/dist/agent/normalize.d.ts.map +1 -1
- package/dist/agent/normalize.js +1 -7
- package/dist/agent/normalize.js.map +1 -1
- package/dist/agent/orient.d.ts.map +1 -1
- package/dist/agent/orient.js +2 -6
- package/dist/agent/orient.js.map +1 -1
- package/dist/agent/packet.d.ts.map +1 -1
- package/dist/agent/packet.js +2 -5
- package/dist/agent/packet.js.map +1 -1
- package/dist/agent/query-index/content.d.ts.map +1 -1
- package/dist/agent/query-index/content.js +2 -6
- package/dist/agent/query-index/content.js.map +1 -1
- package/dist/agent/query-index/update.d.ts.map +1 -1
- package/dist/agent/query-index/update.js +8 -45
- package/dist/agent/query-index/update.js.map +1 -1
- package/dist/agent/query-index/worker-pool.d.ts.map +1 -1
- package/dist/agent/query-index/worker-pool.js +2 -1
- package/dist/agent/query-index/worker-pool.js.map +1 -1
- package/dist/agent/refactor-plan.d.ts +2 -2
- package/dist/agent/refactor-plan.d.ts.map +1 -1
- package/dist/agent/refactor-plan.js +11 -57
- package/dist/agent/refactor-plan.js.map +1 -1
- package/dist/agent/rename-preview.d.ts.map +1 -1
- package/dist/agent/rename-preview.js +166 -23
- package/dist/agent/rename-preview.js.map +1 -1
- package/dist/agent/search.d.ts.map +1 -1
- package/dist/agent/search.js +7 -22
- package/dist/agent/search.js.map +1 -1
- package/dist/agent/semantic-symbols.d.ts +1 -1
- package/dist/agent/semantic-symbols.d.ts.map +1 -1
- package/dist/agent/semantic-symbols.js +2 -5
- package/dist/agent/semantic-symbols.js.map +1 -1
- package/dist/agent/semantic.d.ts +5 -0
- package/dist/agent/semantic.d.ts.map +1 -1
- package/dist/agent/semantic.js +12 -1
- package/dist/agent/semantic.js.map +1 -1
- package/dist/agent/session.d.ts +9 -0
- package/dist/agent/session.d.ts.map +1 -1
- package/dist/agent/session.js +59 -41
- package/dist/agent/session.js.map +1 -1
- package/dist/agent/type-hierarchy.d.ts +4 -2
- package/dist/agent/type-hierarchy.d.ts.map +1 -1
- package/dist/agent/type-hierarchy.js +19 -31
- package/dist/agent/type-hierarchy.js.map +1 -1
- package/dist/agent/workspace-symbols.d.ts +1 -1
- package/dist/agent/workspace-symbols.d.ts.map +1 -1
- package/dist/agent/workspace-symbols.js +7 -15
- package/dist/agent/workspace-symbols.js.map +1 -1
- package/dist/analysis-summary.d.ts +1 -4
- package/dist/analysis-summary.d.ts.map +1 -1
- package/dist/analysis-summary.js +58 -19
- package/dist/analysis-summary.js.map +1 -1
- package/dist/bin/cli.js +35471 -23021
- package/dist/bin/query-index-worker.js +268 -241
- package/dist/bootstrap/tree-sitter-languages.d.ts +2 -0
- package/dist/bootstrap/tree-sitter-languages.d.ts.map +1 -1
- package/dist/bootstrap/tree-sitter-languages.js +6 -19
- package/dist/bootstrap/tree-sitter-languages.js.map +1 -1
- package/dist/chunking/chunk-matches.d.ts.map +1 -1
- package/dist/chunking/chunk-matches.js +6 -42
- package/dist/chunking/chunk-matches.js.map +1 -1
- package/dist/chunking/chunk-split.d.ts +7 -0
- package/dist/chunking/chunk-split.d.ts.map +1 -1
- package/dist/chunking/chunk-split.js +3 -3
- package/dist/chunking/chunk-split.js.map +1 -1
- package/dist/chunking/chunk-text-file.js +2 -30
- package/dist/chunking/chunk-text-file.js.map +1 -1
- package/dist/cli/affected.d.ts.map +1 -1
- package/dist/cli/affected.js +1 -9
- package/dist/cli/affected.js.map +1 -1
- package/dist/cli/call-hierarchy.js +3 -6
- package/dist/cli/call-hierarchy.js.map +1 -1
- package/dist/cli/chunk.d.ts.map +1 -1
- package/dist/cli/chunk.js +4 -11
- package/dist/cli/chunk.js.map +1 -1
- package/dist/cli/command-table.d.ts.map +1 -1
- package/dist/cli/command-table.js +3 -0
- package/dist/cli/command-table.js.map +1 -1
- package/dist/cli/context.d.ts +1 -0
- package/dist/cli/context.d.ts.map +1 -1
- package/dist/cli/context.js +1 -1
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +1 -11
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/graph.d.ts +4 -12
- package/dist/cli/graph.d.ts.map +1 -1
- package/dist/cli/graph.js +17 -8
- package/dist/cli/graph.js.map +1 -1
- package/dist/cli/help.d.ts +3 -3
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +6 -4
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.d.ts +2 -12
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/links.d.ts.map +1 -1
- package/dist/cli/links.js +4 -10
- package/dist/cli/links.js.map +1 -1
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +1 -0
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/module-locals.d.ts +8 -0
- package/dist/cli/module-locals.d.ts.map +1 -0
- package/dist/cli/module-locals.js +9 -0
- package/dist/cli/module-locals.js.map +1 -0
- package/dist/cli/navigation.d.ts +2 -0
- package/dist/cli/navigation.d.ts.map +1 -1
- package/dist/cli/navigation.js +3 -5
- package/dist/cli/navigation.js.map +1 -1
- package/dist/cli/options.d.ts.map +1 -1
- package/dist/cli/options.js +2 -1
- package/dist/cli/options.js.map +1 -1
- package/dist/cli/pretty.d.ts +1 -0
- package/dist/cli/pretty.d.ts.map +1 -1
- package/dist/cli/pretty.js +6 -8
- package/dist/cli/pretty.js.map +1 -1
- package/dist/cli/refactor-plan.js +2 -5
- package/dist/cli/refactor-plan.js.map +1 -1
- package/dist/cli/rename-preview.js +2 -5
- package/dist/cli/rename-preview.js.map +1 -1
- package/dist/cli/review.d.ts +6 -16
- package/dist/cli/review.d.ts.map +1 -1
- package/dist/cli/review.js +2 -0
- package/dist/cli/review.js.map +1 -1
- package/dist/cli/server.d.ts.map +1 -1
- package/dist/cli/server.js +7 -10
- package/dist/cli/server.js.map +1 -1
- package/dist/cli/type-hierarchy.js +8 -8
- package/dist/cli/type-hierarchy.js.map +1 -1
- package/dist/document-links/asciidoc.d.ts.map +1 -1
- package/dist/document-links/asciidoc.js +4 -16
- package/dist/document-links/asciidoc.js.map +1 -1
- package/dist/document-links/check.d.ts.map +1 -1
- package/dist/document-links/check.js +1 -3
- package/dist/document-links/check.js.map +1 -1
- package/dist/document-links/html.d.ts.map +1 -1
- package/dist/document-links/html.js +6 -44
- package/dist/document-links/html.js.map +1 -1
- package/dist/document-links/markdown.d.ts.map +1 -1
- package/dist/document-links/markdown.js +4 -13
- package/dist/document-links/markdown.js.map +1 -1
- package/dist/document-links/rst.d.ts.map +1 -1
- package/dist/document-links/rst.js +7 -31
- package/dist/document-links/rst.js.map +1 -1
- package/dist/document-links/sfc.d.ts.map +1 -1
- package/dist/document-links/sfc.js +2 -5
- package/dist/document-links/sfc.js.map +1 -1
- package/dist/document-links/shared.d.ts +2 -0
- package/dist/document-links/shared.d.ts.map +1 -1
- package/dist/document-links/shared.js +13 -0
- package/dist/document-links/shared.js.map +1 -1
- package/dist/drift/artifact.d.ts.map +1 -1
- package/dist/drift/artifact.js +4 -27
- package/dist/drift/artifact.js.map +1 -1
- package/dist/drift/graph-edges.d.ts +4 -0
- package/dist/drift/graph-edges.d.ts.map +1 -0
- package/dist/drift/graph-edges.js +15 -0
- package/dist/drift/graph-edges.js.map +1 -0
- package/dist/drift/snapshot.d.ts.map +1 -1
- package/dist/drift/snapshot.js +2 -17
- package/dist/drift/snapshot.js.map +1 -1
- package/dist/duplicates/unit-cache.d.ts +11 -1
- package/dist/duplicates/unit-cache.d.ts.map +1 -1
- package/dist/duplicates/unit-cache.js +20 -2
- package/dist/duplicates/unit-cache.js.map +1 -1
- package/dist/duplicates/units.d.ts +2 -1
- package/dist/duplicates/units.d.ts.map +1 -1
- package/dist/duplicates/units.js +23 -22
- package/dist/duplicates/units.js.map +1 -1
- package/dist/graph-builder.d.ts +1 -1
- package/dist/graph-builder.d.ts.map +1 -1
- package/dist/graph-builder.js +3 -2
- package/dist/graph-builder.js.map +1 -1
- package/dist/graph-edge-collector.d.ts +3 -1
- package/dist/graph-edge-collector.d.ts.map +1 -1
- package/dist/graph-edge-collector.js +38 -6
- package/dist/graph-edge-collector.js.map +1 -1
- package/dist/graphs/angularjs.d.ts.map +1 -1
- package/dist/graphs/angularjs.js +2 -9
- package/dist/graphs/angularjs.js.map +1 -1
- package/dist/graphs/edge-resolution.d.ts +4 -0
- package/dist/graphs/edge-resolution.d.ts.map +1 -1
- package/dist/graphs/edge-resolution.js +2 -0
- package/dist/graphs/edge-resolution.js.map +1 -1
- package/dist/graphs/external/manifests.d.ts.map +1 -1
- package/dist/graphs/external/manifests.js +1 -6
- package/dist/graphs/external/manifests.js.map +1 -1
- package/dist/graphs/specifiers.d.ts.map +1 -1
- package/dist/graphs/specifiers.js +47 -26
- package/dist/graphs/specifiers.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed/edge-passes.d.ts +2 -0
- package/dist/graphs/symbol-graph-detailed/edge-passes.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed/edge-passes.js +9 -3
- package/dist/graphs/symbol-graph-detailed/edge-passes.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed/receiver-calls.d.ts +3 -3
- package/dist/graphs/symbol-graph-detailed/receiver-calls.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed/receiver-calls.js +2 -26
- package/dist/graphs/symbol-graph-detailed/receiver-calls.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed.js +38 -1
- package/dist/graphs/symbol-graph-detailed.js.map +1 -1
- package/dist/impact/analyzer.d.ts.map +1 -1
- package/dist/impact/analyzer.js +23 -17
- package/dist/impact/analyzer.js.map +1 -1
- package/dist/impact/budgets.d.ts.map +1 -1
- package/dist/impact/budgets.js +3 -9
- package/dist/impact/budgets.js.map +1 -1
- package/dist/impact/call-compatibility.d.ts.map +1 -1
- package/dist/impact/call-compatibility.js +3 -12
- package/dist/impact/call-compatibility.js.map +1 -1
- package/dist/impact/context.d.ts +6 -0
- package/dist/impact/context.d.ts.map +1 -1
- package/dist/impact/context.js +2 -2
- package/dist/impact/context.js.map +1 -1
- package/dist/impact/direct.d.ts.map +1 -1
- package/dist/impact/direct.js +2 -6
- package/dist/impact/direct.js.map +1 -1
- package/dist/impact/map.d.ts +3 -1
- package/dist/impact/map.d.ts.map +1 -1
- package/dist/impact/map.js +12 -5
- package/dist/impact/map.js.map +1 -1
- package/dist/impact/reference-cache.d.ts.map +1 -1
- package/dist/impact/reference-cache.js +1 -24
- package/dist/impact/reference-cache.js.map +1 -1
- package/dist/impact/report-shared.d.ts +2 -1
- package/dist/impact/report-shared.d.ts.map +1 -1
- package/dist/impact/report-shared.js +10 -0
- package/dist/impact/report-shared.js.map +1 -1
- package/dist/impact/report-suggestions.d.ts.map +1 -1
- package/dist/impact/report-suggestions.js +2 -8
- package/dist/impact/report-suggestions.js.map +1 -1
- package/dist/impact/report.d.ts.map +1 -1
- package/dist/impact/report.js +2 -8
- package/dist/impact/report.js.map +1 -1
- package/dist/impact/streaming.d.ts.map +1 -1
- package/dist/impact/streaming.js +3 -8
- package/dist/impact/streaming.js.map +1 -1
- package/dist/indexer/build-cache/manifest.d.ts.map +1 -1
- package/dist/indexer/build-cache/manifest.js +10 -108
- package/dist/indexer/build-cache/manifest.js.map +1 -1
- package/dist/indexer/build-cache/module-cache.d.ts +6 -1
- package/dist/indexer/build-cache/module-cache.d.ts.map +1 -1
- package/dist/indexer/build-cache/module-cache.js +25 -2
- package/dist/indexer/build-cache/module-cache.js.map +1 -1
- package/dist/indexer/build-cache/options.d.ts +38 -1
- package/dist/indexer/build-cache/options.d.ts.map +1 -1
- package/dist/indexer/build-cache/options.js +38 -1
- package/dist/indexer/build-cache/options.js.map +1 -1
- package/dist/indexer/build-cache/project-snapshot.d.ts.map +1 -1
- package/dist/indexer/build-cache/project-snapshot.js +48 -99
- package/dist/indexer/build-cache/project-snapshot.js.map +1 -1
- package/dist/indexer/build-cache/reports.d.ts +1 -0
- package/dist/indexer/build-cache/reports.d.ts.map +1 -1
- package/dist/indexer/build-cache/reports.js +10 -0
- package/dist/indexer/build-cache/reports.js.map +1 -1
- package/dist/indexer/build-index.d.ts +2 -0
- package/dist/indexer/build-index.d.ts.map +1 -1
- package/dist/indexer/build-index.js +187 -57
- package/dist/indexer/build-index.js.map +1 -1
- package/dist/indexer/build-workers.d.ts +7 -1
- package/dist/indexer/build-workers.d.ts.map +1 -1
- package/dist/indexer/build-workers.js +12 -0
- package/dist/indexer/build-workers.js.map +1 -1
- package/dist/indexer/call-hierarchy.d.ts.map +1 -1
- package/dist/indexer/call-hierarchy.js +5 -17
- package/dist/indexer/call-hierarchy.js.map +1 -1
- package/dist/indexer/compilation-units.d.ts +32 -20
- package/dist/indexer/compilation-units.d.ts.map +1 -1
- package/dist/indexer/compilation-units.js +139 -145
- package/dist/indexer/compilation-units.js.map +1 -1
- package/dist/indexer/cpp-callables.d.ts.map +1 -1
- package/dist/indexer/cpp-callables.js +2 -7
- package/dist/indexer/cpp-callables.js.map +1 -1
- package/dist/indexer/import-types.d.ts +5 -0
- package/dist/indexer/import-types.d.ts.map +1 -1
- package/dist/indexer/import-types.js.map +1 -1
- package/dist/indexer/imports/binding-ranges.d.ts +5 -12
- package/dist/indexer/imports/binding-ranges.d.ts.map +1 -1
- package/dist/indexer/imports/binding-ranges.js +13 -19
- package/dist/indexer/imports/binding-ranges.js.map +1 -1
- package/dist/indexer/imports/context.d.ts +6 -0
- package/dist/indexer/imports/context.d.ts.map +1 -1
- package/dist/indexer/imports/import-binding-tables.d.ts +28 -13
- package/dist/indexer/imports/import-binding-tables.d.ts.map +1 -1
- package/dist/indexer/imports/import-binding-tables.js +179 -178
- package/dist/indexer/imports/import-binding-tables.js.map +1 -1
- package/dist/indexer/imports/js-text-imports.d.ts +0 -1
- package/dist/indexer/imports/js-text-imports.d.ts.map +1 -1
- package/dist/indexer/imports/js-text-imports.js +0 -176
- package/dist/indexer/imports/js-text-imports.js.map +1 -1
- package/dist/indexer/imports/language-specific.d.ts.map +1 -1
- package/dist/indexer/imports/language-specific.js +4 -8
- package/dist/indexer/imports/language-specific.js.map +1 -1
- package/dist/indexer/imports/python.d.ts +0 -1
- package/dist/indexer/imports/python.d.ts.map +1 -1
- package/dist/indexer/imports/python.js +1 -29
- package/dist/indexer/imports/python.js.map +1 -1
- package/dist/indexer/imports/text-import-extractors.d.ts +2 -9
- package/dist/indexer/imports/text-import-extractors.d.ts.map +1 -1
- package/dist/indexer/imports/text-import-extractors.js +0 -284
- package/dist/indexer/imports/text-import-extractors.js.map +1 -1
- package/dist/indexer/imports.d.ts +15 -0
- package/dist/indexer/imports.d.ts.map +1 -1
- package/dist/indexer/imports.js +82 -44
- package/dist/indexer/imports.js.map +1 -1
- package/dist/indexer/incremental-plan.d.ts +0 -1
- package/dist/indexer/incremental-plan.d.ts.map +1 -1
- package/dist/indexer/incremental-plan.js +6 -12
- package/dist/indexer/incremental-plan.js.map +1 -1
- package/dist/indexer/name-lookup-policies/implicit-self.d.ts.map +1 -1
- package/dist/indexer/name-lookup-policies/implicit-self.js +25 -4
- package/dist/indexer/name-lookup-policies/implicit-self.js.map +1 -1
- package/dist/indexer/name-resolution-types.d.ts +5 -0
- package/dist/indexer/name-resolution-types.d.ts.map +1 -1
- package/dist/indexer/name-resolution.d.ts.map +1 -1
- package/dist/indexer/name-resolution.js +2 -0
- package/dist/indexer/name-resolution.js.map +1 -1
- package/dist/indexer/navigation-cpp.d.ts.map +1 -1
- package/dist/indexer/navigation-cpp.js +3 -5
- package/dist/indexer/navigation-cpp.js.map +1 -1
- package/dist/indexer/navigation-goto.d.ts +49 -3
- package/dist/indexer/navigation-goto.d.ts.map +1 -1
- package/dist/indexer/navigation-goto.js +500 -106
- package/dist/indexer/navigation-goto.js.map +1 -1
- package/dist/indexer/navigation-local.d.ts +7 -0
- package/dist/indexer/navigation-local.d.ts.map +1 -1
- package/dist/indexer/navigation-local.js +22 -2
- package/dist/indexer/navigation-local.js.map +1 -1
- package/dist/indexer/navigation-php.d.ts +0 -1
- package/dist/indexer/navigation-php.d.ts.map +1 -1
- package/dist/indexer/navigation-php.js +1 -7
- package/dist/indexer/navigation-php.js.map +1 -1
- package/dist/indexer/navigation-references.d.ts +1 -0
- package/dist/indexer/navigation-references.d.ts.map +1 -1
- package/dist/indexer/navigation-references.js +134 -23
- package/dist/indexer/navigation-references.js.map +1 -1
- package/dist/indexer/navigation-resolve.d.ts +22 -0
- package/dist/indexer/navigation-resolve.d.ts.map +1 -1
- package/dist/indexer/navigation-resolve.js +73 -8
- package/dist/indexer/navigation-resolve.js.map +1 -1
- package/dist/indexer/navigation.d.ts +4 -1
- package/dist/indexer/navigation.d.ts.map +1 -1
- package/dist/indexer/navigation.js +398 -95
- package/dist/indexer/navigation.js.map +1 -1
- package/dist/indexer/python-property-decorator.d.ts +11 -0
- package/dist/indexer/python-property-decorator.d.ts.map +1 -0
- package/dist/indexer/python-property-decorator.js +30 -0
- package/dist/indexer/python-property-decorator.js.map +1 -0
- package/dist/indexer/shared-owner-identity.d.ts +3 -1
- package/dist/indexer/shared-owner-identity.d.ts.map +1 -1
- package/dist/indexer/shared-owner-identity.js +40 -12
- package/dist/indexer/shared-owner-identity.js.map +1 -1
- package/dist/indexer/shared.d.ts +10 -0
- package/dist/indexer/shared.d.ts.map +1 -1
- package/dist/indexer/shared.js +8 -0
- package/dist/indexer/shared.js.map +1 -1
- package/dist/indexer/star-import-precedence.d.ts +5 -1
- package/dist/indexer/star-import-precedence.d.ts.map +1 -1
- package/dist/indexer/star-import-precedence.js +12 -19
- package/dist/indexer/star-import-precedence.js.map +1 -1
- package/dist/indexer/type-hierarchy.d.ts.map +1 -1
- package/dist/indexer/type-hierarchy.js +8 -9
- package/dist/indexer/type-hierarchy.js.map +1 -1
- package/dist/indexer/types.d.ts +49 -1
- package/dist/indexer/types.d.ts.map +1 -1
- package/dist/indexer/types.js.map +1 -1
- package/dist/indexer/workspace-symbols.d.ts.map +1 -1
- package/dist/indexer/workspace-symbols.js +3 -13
- package/dist/indexer/workspace-symbols.js.map +1 -1
- package/dist/installer/locks.d.ts +1 -0
- package/dist/installer/locks.d.ts.map +1 -1
- package/dist/installer/locks.js +4 -8
- package/dist/installer/locks.js.map +1 -1
- package/dist/installer/registry.d.ts.map +1 -1
- package/dist/installer/registry.js +9 -15
- package/dist/installer/registry.js.map +1 -1
- package/dist/languages/callable-arity.d.ts.map +1 -1
- package/dist/languages/callable-arity.js +1 -38
- package/dist/languages/callable-arity.js.map +1 -1
- package/dist/languages/definitions/csharp.d.ts.map +1 -1
- package/dist/languages/definitions/csharp.js +5 -13
- package/dist/languages/definitions/csharp.js.map +1 -1
- package/dist/languages/definitions/java.d.ts.map +1 -1
- package/dist/languages/definitions/java.js +4 -13
- package/dist/languages/definitions/java.js.map +1 -1
- package/dist/languages/definitions/kotlin.d.ts.map +1 -1
- package/dist/languages/definitions/kotlin.js +4 -8
- package/dist/languages/definitions/kotlin.js.map +1 -1
- package/dist/languages/definitions/python.d.ts.map +1 -1
- package/dist/languages/definitions/python.js +5 -3
- package/dist/languages/definitions/python.js.map +1 -1
- package/dist/languages/import-statement-parsers.d.ts +0 -30
- package/dist/languages/import-statement-parsers.d.ts.map +1 -1
- package/dist/languages/import-statement-parsers.js +1 -81
- package/dist/languages/import-statement-parsers.js.map +1 -1
- package/dist/languages/sfc.d.ts.map +1 -1
- package/dist/languages/sfc.js +8 -43
- package/dist/languages/sfc.js.map +1 -1
- package/dist/lifecycle/manifest.d.ts.map +1 -1
- package/dist/lifecycle/manifest.js +11 -29
- package/dist/lifecycle/manifest.js.map +1 -1
- package/dist/mcp/handlers.d.ts +21 -0
- package/dist/mcp/handlers.d.ts.map +1 -1
- package/dist/mcp/handlers.js +66 -20
- package/dist/mcp/handlers.js.map +1 -1
- package/dist/mcp/http-transport.d.ts.map +1 -1
- package/dist/mcp/http-transport.js +5 -1
- package/dist/mcp/http-transport.js.map +1 -1
- package/dist/mcp/project-watcher.d.ts +125 -0
- package/dist/mcp/project-watcher.d.ts.map +1 -0
- package/dist/mcp/project-watcher.js +643 -0
- package/dist/mcp/project-watcher.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +5 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/native/byte-index.d.ts +1 -0
- package/dist/native/byte-index.d.ts.map +1 -1
- package/dist/native/byte-index.js +1 -1
- package/dist/native/byte-index.js.map +1 -1
- package/dist/native/contracts.d.ts +1 -0
- package/dist/native/contracts.d.ts.map +1 -1
- package/dist/native/native-backend-report.d.ts +2 -1
- package/dist/native/native-backend-report.d.ts.map +1 -1
- package/dist/native/native-backend-report.js +23 -0
- package/dist/native/native-backend-report.js.map +1 -1
- package/dist/native/tree-shape.d.ts +5 -7
- package/dist/native/tree-shape.d.ts.map +1 -1
- package/dist/native/tree-shape.js +11 -10
- package/dist/native/tree-shape.js.map +1 -1
- package/dist/presentation/bounds.d.ts +2 -0
- package/dist/presentation/bounds.d.ts.map +1 -1
- package/dist/presentation/bounds.js +8 -0
- package/dist/presentation/bounds.js.map +1 -1
- package/dist/review/candidates.d.ts.map +1 -1
- package/dist/review/candidates.js +4 -25
- package/dist/review/candidates.js.map +1 -1
- package/dist/review/report.d.ts.map +1 -1
- package/dist/review/report.js +4 -2
- package/dist/review/report.js.map +1 -1
- package/dist/review/summaries.d.ts.map +1 -1
- package/dist/review/summaries.js +14 -35
- package/dist/review/summaries.js.map +1 -1
- package/dist/review.d.ts.map +1 -1
- package/dist/review.js +4 -5
- package/dist/review.js.map +1 -1
- package/dist/scss/navigation.d.ts +13 -0
- package/dist/scss/navigation.d.ts.map +1 -0
- package/dist/scss/navigation.js +150 -0
- package/dist/scss/navigation.js.map +1 -0
- package/dist/scss/resolution.d.ts +190 -0
- package/dist/scss/resolution.d.ts.map +1 -0
- package/dist/scss/resolution.js +1802 -0
- package/dist/scss/resolution.js.map +1 -0
- package/dist/scss/syntax.d.ts +181 -0
- package/dist/scss/syntax.d.ts.map +1 -0
- package/dist/scss/syntax.js +1436 -0
- package/dist/scss/syntax.js.map +1 -0
- package/dist/sql/classify-sql-file.d.ts +7 -0
- package/dist/sql/classify-sql-file.d.ts.map +1 -1
- package/dist/sql/classify-sql-file.js +9 -0
- package/dist/sql/classify-sql-file.js.map +1 -1
- package/dist/sql/extract-facts.d.ts.map +1 -1
- package/dist/sql/extract-facts.js +517 -77
- package/dist/sql/extract-facts.js.map +1 -1
- package/dist/sql/lex.d.ts +100 -1
- package/dist/sql/lex.d.ts.map +1 -1
- package/dist/sql/lex.js +473 -11
- package/dist/sql/lex.js.map +1 -1
- package/dist/sql/lookup.d.ts +17 -0
- package/dist/sql/lookup.d.ts.map +1 -1
- package/dist/sql/lookup.js +21 -0
- package/dist/sql/lookup.js.map +1 -1
- package/dist/sql/navigation.d.ts +28 -1
- package/dist/sql/navigation.d.ts.map +1 -1
- package/dist/sql/navigation.js +474 -84
- package/dist/sql/navigation.js.map +1 -1
- package/dist/sql/object-mentions.d.ts +24 -0
- package/dist/sql/object-mentions.d.ts.map +1 -0
- package/dist/sql/object-mentions.js +233 -0
- package/dist/sql/object-mentions.js.map +1 -0
- package/dist/sql/review.d.ts +3 -0
- package/dist/sql/review.d.ts.map +1 -1
- package/dist/sql/review.js +15 -14
- package/dist/sql/review.js.map +1 -1
- package/dist/sql/routine-mentions.d.ts +61 -0
- package/dist/sql/routine-mentions.d.ts.map +1 -0
- package/dist/sql/routine-mentions.js +868 -0
- package/dist/sql/routine-mentions.js.map +1 -0
- package/dist/sql/source-graph.d.ts +18 -3
- package/dist/sql/source-graph.d.ts.map +1 -1
- package/dist/sql/source-graph.js +109 -32
- package/dist/sql/source-graph.js.map +1 -1
- package/dist/sqlite/raw-query-worker-pool.d.ts.map +1 -1
- package/dist/sqlite/raw-query-worker-pool.js +2 -0
- package/dist/sqlite/raw-query-worker-pool.js.map +1 -1
- package/dist/sqlite/types.d.ts +6 -5
- package/dist/sqlite/types.d.ts.map +1 -1
- package/dist/sqlite/write.d.ts.map +1 -1
- package/dist/sqlite/write.js.map +1 -1
- package/dist/sqlite-driver.d.ts +0 -1
- package/dist/sqlite-driver.d.ts.map +1 -1
- package/dist/sqlite-driver.js +0 -11
- package/dist/sqlite-driver.js.map +1 -1
- package/dist/terraform/navigation.d.ts.map +1 -1
- package/dist/terraform/navigation.js +1 -3
- package/dist/terraform/navigation.js.map +1 -1
- package/dist/terraform/syntax.d.ts.map +1 -1
- package/dist/terraform/syntax.js +1 -4
- package/dist/terraform/syntax.js.map +1 -1
- package/dist/util/ast.d.ts +5 -0
- package/dist/util/ast.d.ts.map +1 -1
- package/dist/util/ast.js +10 -0
- package/dist/util/ast.js.map +1 -1
- package/dist/util/atomic-file.d.ts +22 -0
- package/dist/util/atomic-file.d.ts.map +1 -0
- package/dist/util/atomic-file.js +106 -0
- package/dist/util/atomic-file.js.map +1 -0
- package/dist/util/collections.d.ts +5 -0
- package/dist/util/collections.d.ts.map +1 -1
- package/dist/util/collections.js +26 -0
- package/dist/util/collections.js.map +1 -1
- package/dist/util/concurrency.d.ts +1 -0
- package/dist/util/concurrency.d.ts.map +1 -1
- package/dist/util/concurrency.js +5 -0
- package/dist/util/concurrency.js.map +1 -1
- package/dist/util/confined-file.d.ts.map +1 -1
- package/dist/util/confined-file.js +1 -3
- package/dist/util/confined-file.js.map +1 -1
- package/dist/util/csharp-tree.d.ts +65 -0
- package/dist/util/csharp-tree.d.ts.map +1 -0
- package/dist/util/csharp-tree.js +266 -0
- package/dist/util/csharp-tree.js.map +1 -0
- package/dist/util/errors.d.ts +1 -0
- package/dist/util/errors.d.ts.map +1 -1
- package/dist/util/errors.js +3 -0
- package/dist/util/errors.js.map +1 -1
- package/dist/util/graph-edges.d.ts +2 -0
- package/dist/util/graph-edges.d.ts.map +1 -1
- package/dist/util/graph-edges.js +11 -0
- package/dist/util/graph-edges.js.map +1 -1
- package/dist/util/guards.d.ts +1 -0
- package/dist/util/guards.d.ts.map +1 -1
- package/dist/util/guards.js +6 -0
- package/dist/util/guards.js.map +1 -1
- package/dist/util/identifiers.d.ts +0 -24
- package/dist/util/identifiers.d.ts.map +1 -1
- package/dist/util/identifiers.js +0 -24
- package/dist/util/identifiers.js.map +1 -1
- package/dist/util/jvm-tree.d.ts +58 -0
- package/dist/util/jvm-tree.d.ts.map +1 -0
- package/dist/util/jvm-tree.js +153 -0
- package/dist/util/jvm-tree.js.map +1 -0
- package/dist/util/package-exports.d.ts +0 -22
- package/dist/util/package-exports.d.ts.map +1 -1
- package/dist/util/package-exports.js +25 -5
- package/dist/util/package-exports.js.map +1 -1
- package/dist/util/paths.d.ts +1 -0
- package/dist/util/paths.d.ts.map +1 -1
- package/dist/util/paths.js +10 -4
- package/dist/util/paths.js.map +1 -1
- package/dist/util/resolution/csharp.d.ts +20 -8
- package/dist/util/resolution/csharp.d.ts.map +1 -1
- package/dist/util/resolution/csharp.js +126 -127
- package/dist/util/resolution/csharp.js.map +1 -1
- package/dist/util/resolution/files.d.ts +6 -0
- package/dist/util/resolution/files.d.ts.map +1 -1
- package/dist/util/resolution/files.js +74 -21
- package/dist/util/resolution/files.js.map +1 -1
- package/dist/util/resolution/jvm.d.ts +21 -1
- package/dist/util/resolution/jvm.d.ts.map +1 -1
- package/dist/util/resolution/jvm.js +168 -100
- package/dist/util/resolution/jvm.js.map +1 -1
- package/dist/util/resolution/project-symbols.d.ts +1 -1
- package/dist/util/resolution/project-symbols.d.ts.map +1 -1
- package/dist/util/resolution/project-symbols.js.map +1 -1
- package/dist/util/resolution/specifier-targets.d.ts +4 -0
- package/dist/util/resolution/specifier-targets.d.ts.map +1 -1
- package/dist/util/resolution/specifier-targets.js +11 -3
- package/dist/util/resolution/specifier-targets.js.map +1 -1
- package/dist/util/resolution.d.ts.map +1 -1
- package/dist/util/resolution.js +21 -7
- package/dist/util/resolution.js.map +1 -1
- package/dist/util/syntax-tree.d.ts +16 -0
- package/dist/util/syntax-tree.d.ts.map +1 -0
- package/dist/util/syntax-tree.js +34 -0
- package/dist/util/syntax-tree.js.map +1 -0
- package/dist/util/text-scanning.d.ts +6 -0
- package/dist/util/text-scanning.d.ts.map +1 -0
- package/dist/util/text-scanning.js +35 -0
- package/dist/util/text-scanning.js.map +1 -0
- package/dist/util/trivia-tables.d.ts +13 -8
- package/dist/util/trivia-tables.d.ts.map +1 -1
- package/dist/util/trivia-tables.js +13 -72
- package/dist/util/trivia-tables.js.map +1 -1
- package/dist/util/trivia.d.ts +10 -3
- package/dist/util/trivia.d.ts.map +1 -1
- package/dist/util/trivia.js +209 -79
- package/dist/util/trivia.js.map +1 -1
- package/dist/util/windows-process-drain.d.ts.map +1 -1
- package/dist/util/windows-process-drain.js.map +1 -1
- package/dist/util/worker-threads.d.ts +16 -0
- package/dist/util/worker-threads.d.ts.map +1 -1
- package/dist/util/worker-threads.js +118 -0
- package/dist/util/worker-threads.js.map +1 -1
- package/dist/worker/native-worker-pool.d.ts.map +1 -1
- package/dist/worker/native-worker-pool.js +2 -1
- package/dist/worker/native-worker-pool.js.map +1 -1
- package/docs/mcp.md +27 -2
- package/package.json +7 -7
|
@@ -11,7 +11,11 @@ import { DEFAULT_PROJECT_PATTERNS, createProjectDiscoveryContext, discoverProjec
|
|
|
11
11
|
import { getGitHead, isGitRepo, getGitBlobHashes, listChangedFiles } from "../util/git.js";
|
|
12
12
|
import { clearResolutionCaches, loadNearestTsconfigFor, resolveSpecifier, } from "../util/resolution.js";
|
|
13
13
|
import { collectCppDeclaredModules, isCppNamedModuleSpecifier } from "../util/resolution/cpp.js";
|
|
14
|
-
import {
|
|
14
|
+
import { collectCsharpNamespaceFacts } from "../util/csharp-tree.js";
|
|
15
|
+
import { collectJvmFileFacts } from "../util/jvm-tree.js";
|
|
16
|
+
import { isJvmLanguage, readsSyntaxTree } from "../util/syntax-tree.js";
|
|
17
|
+
import { primeCsharpNamespaceFacts } from "../util/resolution/csharp.js";
|
|
18
|
+
import { primeJvmFileFacts, resolveJvmPackageImportPaths } from "../util/resolution/jvm.js";
|
|
15
19
|
import { loadTsconfigResolutionInputsFor } from "../util/resolution/tsconfig.js";
|
|
16
20
|
import { resolveModuleSpecifierEdges } from "../graphs/edge-resolution.js";
|
|
17
21
|
import { fileIdentityKey, initializeFileIdentityCaseSensitivity, isFilePathWithinRoot, normalizePath, } from "../util/paths.js";
|
|
@@ -30,7 +34,7 @@ import { collectLocalsAndExportsFromSource } from "./locals-and-exports.js";
|
|
|
30
34
|
import { expandStarImports } from "./expand-star-imports.js";
|
|
31
35
|
import { compareEdges, edgeKey, toRelativeEdge } from "./shared.js";
|
|
32
36
|
import { BloomFilter, buildBloomFilterFromSource } from "../util/bloom-filter.js";
|
|
33
|
-
import { initNativeBackendReport } from "../native/native-backend-report.js";
|
|
37
|
+
import { initNativeBackendReport, recordParserBackendDegradation } from "../native/native-backend-report.js";
|
|
34
38
|
import { closeDuplicateUnitCacheDatabase } from "../duplicates.js";
|
|
35
39
|
import { assertNativeRequiredAvailable, isNativeRequiredUnavailableError } from "../native/tree-sitter-native.js";
|
|
36
40
|
import { isNodeSqliteUnavailableError } from "../sqlite-driver.js";
|
|
@@ -39,57 +43,80 @@ import { computeResolverEnvironmentFingerprint } from "./build-cache/resolver-en
|
|
|
39
43
|
import { cacheRoot } from "./build-cache/location.js";
|
|
40
44
|
import { SymbolKind, } from "./types.js";
|
|
41
45
|
import { isUnsupportedParserInputError } from "../languages/file-prep.js";
|
|
46
|
+
import { isSqlFilePath } from "../sql/classify-sql-file.js";
|
|
42
47
|
import { buildSqlFactCache, buildSqlModuleIndex, sqlCorpusSignature } from "../sql/source-graph.js";
|
|
43
48
|
import { finalizeProjectIndex } from "./finalize.js";
|
|
44
49
|
import { toManifestFileEntry, writeIndexManifestSnapshot } from "./build-manifest.js";
|
|
45
|
-
import { prepareFileContextForBuild, countNativeWorkerEligibleFiles, emptyWorkerPoolSetup, setupWorkerPool, teardownWorkerPool, } from "./build-workers.js";
|
|
50
|
+
import { prepareFileContextForBuild, countNativeWorkerEligibleFiles, emptyWorkerPoolSetup, preparedNativeOutcome, setupWorkerPool, teardownWorkerPool, } from "./build-workers.js";
|
|
46
51
|
import { buildIncrementalGitDiffOptions, canUseIncrementalDiscoveryFastPath, buildTrackedFileReverseDependencies, addedResolutionStems, collectDeletedTrackedFileDependents, collectTrackedFileDependents, collectSpecifierEdgeCandidates, collectPythonPackageImporters, pythonImportersOfPackageInits, externalSpecifierMatchesAddedStem, tsconfigAliasMappedTails, isMissingGitRevisionError, listUntrackedProjectFiles, partitionTrackedManifestFiles, probePathExistence, } from "./incremental-plan.js";
|
|
47
52
|
import { parsedCacheMaxEntries, setParsedCacheEntry } from "./parsed-cache.js";
|
|
48
|
-
function initParserBackendDegradationReport(report) {
|
|
49
|
-
if (!report)
|
|
50
|
-
return undefined;
|
|
51
|
-
initNativeBackendReport(report);
|
|
52
|
-
report.backend ??= {
|
|
53
|
-
native: {
|
|
54
|
-
available: false,
|
|
55
|
-
enabled: false,
|
|
56
|
-
supportedLanguageIds: [],
|
|
57
|
-
filesUsed: 0,
|
|
58
|
-
filesFellBack: 0,
|
|
59
|
-
fallbackReasons: {
|
|
60
|
-
unavailable: 0,
|
|
61
|
-
unsupportedLanguage: 0,
|
|
62
|
-
queryFailure: 0,
|
|
63
|
-
sourceTooLarge: 0,
|
|
64
|
-
},
|
|
65
|
-
byLanguage: {},
|
|
66
|
-
errors: [],
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
report.backend.parser ??= {
|
|
70
|
-
total: 0,
|
|
71
|
-
byLanguage: {},
|
|
72
|
-
files: [],
|
|
73
|
-
};
|
|
74
|
-
return report.backend.parser;
|
|
75
|
-
}
|
|
76
|
-
function recordParserBackendDegradation(report, entry) {
|
|
77
|
-
const parserReport = initParserBackendDegradationReport(report);
|
|
78
|
-
if (!parserReport)
|
|
79
|
-
return;
|
|
80
|
-
parserReport.total += 1;
|
|
81
|
-
parserReport.byLanguage[entry.languageId] = (parserReport.byLanguage[entry.languageId] ?? 0) + 1;
|
|
82
|
-
if (parserReport.files.length >= 20)
|
|
83
|
-
return;
|
|
84
|
-
parserReport.files.push(entry);
|
|
85
|
-
}
|
|
86
53
|
function isConfinedFileReadError(error) {
|
|
87
54
|
return (error instanceof Error &&
|
|
88
55
|
/outside project root|possible path confinement race|changed between verification and open|confined file target/u.test(error.message));
|
|
89
56
|
}
|
|
57
|
+
/** A placeholder module. `parseErrorRanges` stays unset: no parser ran, so its parse state is unknown. */
|
|
90
58
|
function createEmptyModuleIndex(file) {
|
|
91
59
|
return { file, exports: [], imports: [], locals: [] };
|
|
92
60
|
}
|
|
61
|
+
/** A file with no language support: nothing is parsed, so it has no parse errors. */
|
|
62
|
+
function unparsedModuleIndex(file) {
|
|
63
|
+
return { ...createEmptyModuleIndex(file), parseErrorRanges: [] };
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A file whose processing failed. Its symbols are missing from the index, so it is flagged as parser-degraded: the flag
|
|
67
|
+
* keeps the analysis summary incomplete, and marks a module that is never written to the module cache, so the project
|
|
68
|
+
* snapshot embeds it instead of leaving its stale disk row to be restored.
|
|
69
|
+
*/
|
|
70
|
+
function failedModuleIndex(file) {
|
|
71
|
+
return { ...createEmptyModuleIndex(file), parserDegraded: true };
|
|
72
|
+
}
|
|
73
|
+
function collectParseErrorRanges(tree) {
|
|
74
|
+
const columns = tree.columns;
|
|
75
|
+
const isParseErrorNode = (nodeId) => {
|
|
76
|
+
const kind = columns.kinds[columns.kindIds[nodeId]];
|
|
77
|
+
return kind === "ERROR" || columns.isMissing[nodeId] !== 0;
|
|
78
|
+
};
|
|
79
|
+
const ranges = [];
|
|
80
|
+
for (let nodeId = 0; nodeId < columns.nodeCount; nodeId += 1) {
|
|
81
|
+
if (!isParseErrorNode(nodeId))
|
|
82
|
+
continue;
|
|
83
|
+
let parentId = columns.parentIds[nodeId];
|
|
84
|
+
let hasErrorAncestor = false;
|
|
85
|
+
while (parentId >= 0) {
|
|
86
|
+
if (isParseErrorNode(parentId)) {
|
|
87
|
+
hasErrorAncestor = true;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
parentId = columns.parentIds[parentId];
|
|
91
|
+
}
|
|
92
|
+
if (hasErrorAncestor)
|
|
93
|
+
continue;
|
|
94
|
+
// MISSING nodes are zero-width; prefer a containing statement/declaration, then the nearest non-empty ancestor.
|
|
95
|
+
let rangeNodeId = nodeId;
|
|
96
|
+
if (columns.isMissing[nodeId] !== 0) {
|
|
97
|
+
let ancestorId = columns.parentIds[nodeId];
|
|
98
|
+
let nearestNonZeroAncestorId = -1;
|
|
99
|
+
while (ancestorId >= 0) {
|
|
100
|
+
if (columns.startIndex[ancestorId] !== columns.endIndex[ancestorId]) {
|
|
101
|
+
if (nearestNonZeroAncestorId < 0)
|
|
102
|
+
nearestNonZeroAncestorId = ancestorId;
|
|
103
|
+
const kind = columns.kinds[columns.kindIds[ancestorId]];
|
|
104
|
+
if (kind === "statement" || kind.endsWith("_statement") || kind.endsWith("_declaration")) {
|
|
105
|
+
rangeNodeId = ancestorId;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
ancestorId = columns.parentIds[ancestorId];
|
|
110
|
+
}
|
|
111
|
+
if (rangeNodeId === nodeId && nearestNonZeroAncestorId >= 0)
|
|
112
|
+
rangeNodeId = nearestNonZeroAncestorId;
|
|
113
|
+
}
|
|
114
|
+
const startIndex = tree.stringIndexForByte(columns.startIndex[rangeNodeId]);
|
|
115
|
+
const endIndex = tree.stringIndexForByte(columns.endIndex[rangeNodeId]);
|
|
116
|
+
ranges.push({ startIndex, endIndex });
|
|
117
|
+
}
|
|
118
|
+
return ranges;
|
|
119
|
+
}
|
|
93
120
|
/**
|
|
94
121
|
* Declared-container index (container name to declaring files) rebuilt from already-loaded
|
|
95
122
|
* modules. Because `ModuleIndex.declaredContainers` is cached with the module, this reflects
|
|
@@ -216,6 +243,17 @@ function sortedDeclaredContainerIndex(byName) {
|
|
|
216
243
|
function cachedModuleHasExternalImport(mod) {
|
|
217
244
|
return mod.imports.some((binding) => typeof binding.resolved !== "string");
|
|
218
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* Gives the C# namespace scan and the JVM package scan the facts a reused module holds, so they parse nothing for
|
|
248
|
+
* that file. They come from the file's own tree and depend on no other file, so the module's matching signature
|
|
249
|
+
* keeps them valid.
|
|
250
|
+
*/
|
|
251
|
+
function primeReusedFileFacts(file, mod, opts) {
|
|
252
|
+
if (mod.csharpNamespaceFacts)
|
|
253
|
+
primeCsharpNamespaceFacts(file, mod.csharpNamespaceFacts, opts?.languageExtensions);
|
|
254
|
+
if (mod.jvmFacts)
|
|
255
|
+
primeJvmFileFacts(file, mod.jvmFacts);
|
|
256
|
+
}
|
|
219
257
|
/**
|
|
220
258
|
* Declaration-language files that have a cached row, are not in the build, and no longer exist.
|
|
221
259
|
* A deleted file leaves no cache miss, so importers that it satisfied would stay stale.
|
|
@@ -288,6 +326,16 @@ async function buildIndexedModuleForFile(args) {
|
|
|
288
326
|
const prepared = await prepareFileContextForBuild(args.file, args.support, args.opts, args.workerSetup, args.report, args.confinedRoot, args.projectRoot, args.trustedSource, !!args.bloomFilterCache);
|
|
289
327
|
const { source, sup, nativeQueries, embeddedBlocks } = prepared;
|
|
290
328
|
let tree;
|
|
329
|
+
// Every degradation recorded below also marks the module, including a failed import extraction of the file's source
|
|
330
|
+
// or of one of its embedded blocks. A later build that reuses the module from a cache has no report of this one, and
|
|
331
|
+
// still counts the file.
|
|
332
|
+
let parserDegraded = false;
|
|
333
|
+
// Set when a lookup over other files, not this file's own extraction, left part of its imports unresolved.
|
|
334
|
+
let importLookupIncomplete = false;
|
|
335
|
+
const recordTreeUnavailable = (entry) => {
|
|
336
|
+
parserDegraded = true;
|
|
337
|
+
recordParserBackendDegradation(args.report, entry);
|
|
338
|
+
};
|
|
291
339
|
const graphOnlyLanguage = isGraphOnlyLanguage(sup.id), nativeSourceLimitSkip = prepared.nativeFallbackReason === "sourceTooLarge";
|
|
292
340
|
if (prepared.syntaxTree) {
|
|
293
341
|
const parsedTree = new ProjectedSyntaxTree(source, prepared.syntaxTree);
|
|
@@ -308,7 +356,7 @@ async function buildIndexedModuleForFile(args) {
|
|
|
308
356
|
setParsedCacheEntry(args.parsedMap, args.file, parsed, args.parsedCacheMaxEntries);
|
|
309
357
|
}
|
|
310
358
|
else {
|
|
311
|
-
|
|
359
|
+
recordTreeUnavailable({
|
|
312
360
|
file: args.file,
|
|
313
361
|
languageId: prepared.sup.id,
|
|
314
362
|
...(parseAttempt.nativeFallbackReason ? { nativeFallbackReason: parseAttempt.nativeFallbackReason } : {}),
|
|
@@ -325,7 +373,28 @@ async function buildIndexedModuleForFile(args) {
|
|
|
325
373
|
tree = parsed.tree;
|
|
326
374
|
setParsedCacheEntry(args.parsedMap, args.file, parsed, args.parsedCacheMaxEntries);
|
|
327
375
|
}
|
|
376
|
+
else {
|
|
377
|
+
recordTreeUnavailable({
|
|
378
|
+
file: args.file,
|
|
379
|
+
languageId: sup.id,
|
|
380
|
+
...(parseAttempt.nativeFallbackReason ? { nativeFallbackReason: parseAttempt.nativeFallbackReason } : {}),
|
|
381
|
+
...(parseAttempt.nativeError ? { nativeError: parseAttempt.nativeError } : {}),
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
if (sup.id === "sql" && !tree) {
|
|
386
|
+
recordTreeUnavailable({
|
|
387
|
+
file: args.file,
|
|
388
|
+
languageId: sup.id,
|
|
389
|
+
...(prepared.nativeFallbackReason ? { nativeFallbackReason: prepared.nativeFallbackReason } : {}),
|
|
390
|
+
...(prepared.nativeError ? { nativeError: prepared.nativeError } : {}),
|
|
391
|
+
});
|
|
328
392
|
}
|
|
393
|
+
// The package scan reads this file's facts when its own imports resolve, so they are known before then.
|
|
394
|
+
const jvmLanguageId = isJvmLanguage(sup.id) ? sup.id : undefined;
|
|
395
|
+
const jvmFacts = jvmLanguageId && tree ? collectJvmFileFacts(tree, jvmLanguageId) : undefined;
|
|
396
|
+
if (jvmFacts)
|
|
397
|
+
primeJvmFileFacts(args.file, jvmFacts);
|
|
329
398
|
const lacksParserContext = !graphOnlyLanguage && !nativeQueries;
|
|
330
399
|
if (args.bloomFilterCache && !nativeSourceLimitSkip) {
|
|
331
400
|
const filter = prepared.workerBloomFilter
|
|
@@ -333,6 +402,12 @@ async function buildIndexedModuleForFile(args) {
|
|
|
333
402
|
: buildBloomFilterFromSource(source, sup);
|
|
334
403
|
args.bloomFilterCache.set(args.file, filter);
|
|
335
404
|
}
|
|
405
|
+
// A failed extraction leaves this file's imports incomplete, so it marks the module like a missing syntax tree.
|
|
406
|
+
const onDegraded = (cause) => {
|
|
407
|
+
parserDegraded = true;
|
|
408
|
+
if (cause === "lookup")
|
|
409
|
+
importLookupIncomplete = true;
|
|
410
|
+
};
|
|
336
411
|
// Single builder so an option added here always reaches both the primary source and
|
|
337
412
|
// every embedded (SFC) block, instead of one path silently missing a future option.
|
|
338
413
|
const sharedImportOptions = {
|
|
@@ -342,12 +417,15 @@ async function buildIndexedModuleForFile(args) {
|
|
|
342
417
|
...(args.opts?.logLevel ? { logLevel: args.opts.logLevel } : {}),
|
|
343
418
|
...(args.opts?.languageExtensions ? { languageExtensions: args.opts.languageExtensions } : {}),
|
|
344
419
|
...(args.report ? { report: args.report } : {}),
|
|
420
|
+
parsedFiles: args.parsedMap,
|
|
421
|
+
onDegraded,
|
|
345
422
|
};
|
|
346
423
|
const imports = nativeSourceLimitSkip || sup.id === "sql"
|
|
347
424
|
? []
|
|
348
425
|
: await collectImportsForFile(args.file, args.projectRoot, {
|
|
349
426
|
source,
|
|
350
427
|
sup,
|
|
428
|
+
...(readsSyntaxTree(sup.id) && tree ? { tree } : {}),
|
|
351
429
|
...(nativeQueries !== undefined ? { nativeQueries } : {}),
|
|
352
430
|
...sharedImportOptions,
|
|
353
431
|
});
|
|
@@ -376,11 +454,28 @@ async function buildIndexedModuleForFile(args) {
|
|
|
376
454
|
});
|
|
377
455
|
}
|
|
378
456
|
mod.imports = imports;
|
|
457
|
+
if (tree instanceof ProjectedSyntaxTree)
|
|
458
|
+
mod.parseErrorRanges = collectParseErrorRanges(tree);
|
|
459
|
+
else if (graphOnlyLanguage)
|
|
460
|
+
mod.parseErrorRanges = [];
|
|
461
|
+
else
|
|
462
|
+
delete mod.parseErrorRanges;
|
|
463
|
+
const nativeOutcome = preparedNativeOutcome(prepared);
|
|
464
|
+
if (nativeOutcome)
|
|
465
|
+
mod.nativeOutcome = nativeOutcome;
|
|
466
|
+
if (parserDegraded)
|
|
467
|
+
mod.parserDegraded = true;
|
|
468
|
+
if (importLookupIncomplete)
|
|
469
|
+
mod.importLookupIncomplete = true;
|
|
379
470
|
if (sup.id === "cpp") {
|
|
380
471
|
const declaredContainers = collectCppDeclaredModules(source);
|
|
381
472
|
if (declaredContainers.length)
|
|
382
473
|
mod.declaredContainers = declaredContainers;
|
|
383
474
|
}
|
|
475
|
+
if (sup.id === "csharp" && tree)
|
|
476
|
+
mod.csharpNamespaceFacts = collectCsharpNamespaceFacts(tree);
|
|
477
|
+
if (jvmFacts)
|
|
478
|
+
mod.jvmFacts = jvmFacts;
|
|
384
479
|
await resolveCrossModuleSymbolExports(args.file, mod, sup, args.projectRoot, args.graphOptions, args.workspaceConfig, args.matchPath);
|
|
385
480
|
const sigInfo = args.fileSignatures.get(args.file);
|
|
386
481
|
const cacheable = !prepared.nativeFallbackReason && !lacksParserContext;
|
|
@@ -432,6 +527,7 @@ function ensureJsonModule(modules, filePath) {
|
|
|
432
527
|
file: normalized,
|
|
433
528
|
exports: [{ type: "local", exportedAs: "default", target: symbol }],
|
|
434
529
|
imports: [],
|
|
530
|
+
parseErrorRanges: [],
|
|
435
531
|
locals: [symbol],
|
|
436
532
|
});
|
|
437
533
|
}
|
|
@@ -616,7 +712,7 @@ function emitIndexLifecycleProgress(opts, phase, mode, total, elapsedMs) {
|
|
|
616
712
|
...(elapsedMs !== undefined ? { elapsedMs } : {}),
|
|
617
713
|
});
|
|
618
714
|
}
|
|
619
|
-
function emitIndexCheckStart(opts, activity = "Checking project index") {
|
|
715
|
+
export function emitIndexCheckStart(opts, activity = "Checking project index") {
|
|
620
716
|
opts?.onProgress?.({
|
|
621
717
|
type: "progress",
|
|
622
718
|
phase: "start",
|
|
@@ -627,7 +723,7 @@ function emitIndexCheckStart(opts, activity = "Checking project index") {
|
|
|
627
723
|
total: 0,
|
|
628
724
|
});
|
|
629
725
|
}
|
|
630
|
-
function emitIndexCheckActivity(opts, activity, current = 0, total = 0) {
|
|
726
|
+
export function emitIndexCheckActivity(opts, activity, current = 0, total = 0) {
|
|
631
727
|
opts?.onProgress?.({
|
|
632
728
|
type: "progress",
|
|
633
729
|
phase: "update",
|
|
@@ -762,7 +858,9 @@ async function buildProjectIndexFromExport(projectRoot, opts, helperOpts) {
|
|
|
762
858
|
* - it changed;
|
|
763
859
|
* - an import or re-export target no longer exists;
|
|
764
860
|
* - an added file can satisfy one of its specifiers;
|
|
765
|
-
* - it resolves imports through namespace or package declarations, and a file it depends on changed
|
|
861
|
+
* - it resolves imports through namespace or package declarations, and a file it depends on changed;
|
|
862
|
+
* - a lookup of its imports over other files could not read one of them (`importLookupIncomplete`). Nothing records
|
|
863
|
+
* that file when no module covers it, so the file reading again changes no signature, manifest edge, or cache row.
|
|
766
864
|
*
|
|
767
865
|
* With a manifest, the manifest gives the previous files and edges.
|
|
768
866
|
* Without one (a memory cache, or a disk cache that no manifest-writing build has seen),
|
|
@@ -773,6 +871,10 @@ async function collectStaleCachedModules(args) {
|
|
|
773
871
|
if (!cachedModules.size)
|
|
774
872
|
return { stale: new Set(), deletedDeclarationFiles: [] };
|
|
775
873
|
const stale = await cachedModulesWithMissingTargets(cachedModules, args.concurrency);
|
|
874
|
+
for (const [file, { mod }] of cachedModules) {
|
|
875
|
+
if (mod.importLookupIncomplete)
|
|
876
|
+
stale.add(file);
|
|
877
|
+
}
|
|
776
878
|
const resolvesFromDeclarations = (file) => DECLARATION_RESOLVED_IMPORT_LANGUAGES.has(supportForFileWithoutHeaderSample(file, args.opts?.languageExtensions)?.id ?? "");
|
|
777
879
|
const loadTsconfigPaths = (importer) => loadTsconfigResolutionInputsFor(importer, args.projectRoot, args.opts?.logLevel).then((inputs) => inputs?.paths);
|
|
778
880
|
// Deleted declaration files. Only the no-manifest path fills this list.
|
|
@@ -1139,11 +1241,7 @@ async function buildIndexFromFileListShared(projectRoot, rawFiles, opts, helperO
|
|
|
1139
1241
|
const conc = edgeProbeConcurrency;
|
|
1140
1242
|
const languageExtensions = normalizeLanguageExtensions(opts?.languageExtensions);
|
|
1141
1243
|
const sqlFiles = normalizedFiles
|
|
1142
|
-
.filter((file) =>
|
|
1143
|
-
if (!languageExtensions)
|
|
1144
|
-
return path.extname(file).toLowerCase() === ".sql";
|
|
1145
|
-
return supportForFileWithoutHeaderSample(file, languageExtensions)?.id === "sql";
|
|
1146
|
-
})
|
|
1244
|
+
.filter((file) => isSqlFilePath(file, languageExtensions))
|
|
1147
1245
|
.sort((left, right) => left.localeCompare(right));
|
|
1148
1246
|
const fileSignatures = await prepareFileSignatures({
|
|
1149
1247
|
projectRoot,
|
|
@@ -1161,7 +1259,7 @@ async function buildIndexFromFileListShared(projectRoot, rawFiles, opts, helperO
|
|
|
1161
1259
|
return sqlFactCachePromise;
|
|
1162
1260
|
};
|
|
1163
1261
|
const shouldProvideSqlFactCache = (file, sigInfo, cachedEdgesEntry) => {
|
|
1164
|
-
if (
|
|
1262
|
+
if (!isSqlFilePath(file, opts?.languageExtensions))
|
|
1165
1263
|
return false;
|
|
1166
1264
|
if (!cachedEdgesEntry || !sqlCorpusSig || cachedEdgesEntry.sqlCorpusSig !== sqlCorpusSig)
|
|
1167
1265
|
return true;
|
|
@@ -1252,6 +1350,10 @@ async function buildIndexFromFileListShared(projectRoot, rawFiles, opts, helperO
|
|
|
1252
1350
|
else
|
|
1253
1351
|
cacheMissesByState.added.push(file);
|
|
1254
1352
|
}
|
|
1353
|
+
// The stale check scans package and namespace declarations, so it reads each reused module's own facts
|
|
1354
|
+
// instead of parsing the file again. A module's facts depend only on its own source, which its signature proves.
|
|
1355
|
+
for (const [file, { mod }] of cachedModules)
|
|
1356
|
+
primeReusedFileFacts(file, mod, opts);
|
|
1255
1357
|
const { stale: staleCachedModules, deletedDeclarationFiles: retiredDeletions } = await collectStaleCachedModules({
|
|
1256
1358
|
files: normalizedFiles,
|
|
1257
1359
|
cachedModules,
|
|
@@ -1345,6 +1447,7 @@ async function buildIndexFromFileListShared(projectRoot, rawFiles, opts, helperO
|
|
|
1345
1447
|
...(manifest?.projectRoot ? { cachedFileEdgesProjectRoot: manifest.projectRoot } : {}),
|
|
1346
1448
|
...(onFileEdges ? { onFileEdges } : {}),
|
|
1347
1449
|
allFiles: normalizedFiles,
|
|
1450
|
+
parsedFiles: parsedMap,
|
|
1348
1451
|
...(sqlFactCache ? { sqlFactCache } : {}),
|
|
1349
1452
|
});
|
|
1350
1453
|
if (bloomFilterCache) {
|
|
@@ -1364,7 +1467,7 @@ async function buildIndexFromFileListShared(projectRoot, rawFiles, opts, helperO
|
|
|
1364
1467
|
fileReport.parsed = (fileReport.parsed ?? 0) + 1;
|
|
1365
1468
|
const support = supportForFile(file, opts?.languageExtensions);
|
|
1366
1469
|
if (!support)
|
|
1367
|
-
return [file,
|
|
1470
|
+
return [file, unparsedModuleIndex(file), [], undefined];
|
|
1368
1471
|
ensureBuildProgressStarted();
|
|
1369
1472
|
let graphContext;
|
|
1370
1473
|
let cacheWrite;
|
|
@@ -1409,6 +1512,7 @@ async function buildIndexFromFileListShared(projectRoot, rawFiles, opts, helperO
|
|
|
1409
1512
|
...(manifest?.projectRoot ? { cachedFileEdgesProjectRoot: manifest.projectRoot } : {}),
|
|
1410
1513
|
...(onFileEdges ? { onFileEdges } : {}),
|
|
1411
1514
|
allFiles: normalizedFiles,
|
|
1515
|
+
parsedFiles: parsedMap,
|
|
1412
1516
|
...(sqlFactCache ? { sqlFactCache } : {}),
|
|
1413
1517
|
});
|
|
1414
1518
|
return [file, mod ?? createEmptyModuleIndex(file), edges, cacheWrite];
|
|
@@ -1423,7 +1527,7 @@ async function buildIndexFromFileListShared(projectRoot, rawFiles, opts, helperO
|
|
|
1423
1527
|
}
|
|
1424
1528
|
recordFileFailure(report, file, error);
|
|
1425
1529
|
logWithLevel(opts?.logLevel, "warn", `Warning: Failed to process file ${file}:`, error);
|
|
1426
|
-
return [file,
|
|
1530
|
+
return [file, failedModuleIndex(file), []];
|
|
1427
1531
|
}
|
|
1428
1532
|
finally {
|
|
1429
1533
|
processedFiles += 1;
|
|
@@ -2300,6 +2404,8 @@ export async function buildProjectIndexIncremental(projectRoot, rawOpts) {
|
|
|
2300
2404
|
}
|
|
2301
2405
|
}
|
|
2302
2406
|
const reverseDeps = buildTrackedFileReverseDependencies(trackedEntries);
|
|
2407
|
+
// Dependents rebuilt only because a file they depend on changed: their own source may be unchanged.
|
|
2408
|
+
const dependentsToPrime = new Set();
|
|
2303
2409
|
const invalidateCachedDependents = () => {
|
|
2304
2410
|
const dependentFilesOfChanged = collectTrackedFileDependents(trackedEntries, changedFiles, reverseDeps);
|
|
2305
2411
|
for (const file of dependentFilesOfChanged) {
|
|
@@ -2310,6 +2416,9 @@ export async function buildProjectIndexIncremental(projectRoot, rawOpts) {
|
|
|
2310
2416
|
fileReport.cached = Math.max(0, (fileReport.cached ?? 0) - 1);
|
|
2311
2417
|
}
|
|
2312
2418
|
}
|
|
2419
|
+
else if (!changedFiles.has(file)) {
|
|
2420
|
+
dependentsToPrime.add(file);
|
|
2421
|
+
}
|
|
2313
2422
|
markAsChanged(file);
|
|
2314
2423
|
}
|
|
2315
2424
|
};
|
|
@@ -2332,8 +2441,22 @@ export async function buildProjectIndexIncremental(projectRoot, rawOpts) {
|
|
|
2332
2441
|
? await tryLoadPersistedBloomFilters(projectRoot, opts, report)
|
|
2333
2442
|
: null;
|
|
2334
2443
|
for (const file of allFiles) {
|
|
2335
|
-
if (changedFiles.has(file))
|
|
2444
|
+
if (changedFiles.has(file)) {
|
|
2445
|
+
const dependentLanguage = dependentsToPrime.has(file)
|
|
2446
|
+
? supportForFileWithoutHeaderSample(file, opts?.languageExtensions)?.id
|
|
2447
|
+
: undefined;
|
|
2448
|
+
if (readsSyntaxTree(dependentLanguage)) {
|
|
2449
|
+
const key = fileIdentityKey(file);
|
|
2450
|
+
const sigInfo = fileSignatures.get(file);
|
|
2451
|
+
const reusable = snapshotModules?.get(key) ??
|
|
2452
|
+
(cacheEnabled
|
|
2453
|
+
? tryLoadFromCache(projectRoot, file, await moduleCacheSignatureForFile(file, sigInfo, opts, resolverEnvironmentFingerprint), opts)
|
|
2454
|
+
: null);
|
|
2455
|
+
if (reusable)
|
|
2456
|
+
primeReusedFileFacts(file, reusable, opts);
|
|
2457
|
+
}
|
|
2336
2458
|
continue;
|
|
2459
|
+
}
|
|
2337
2460
|
const sigInfo = fileSignatures.get(file);
|
|
2338
2461
|
let cached = null;
|
|
2339
2462
|
const snapshotMod = snapshotModules?.get(fileIdentityKey(file));
|
|
@@ -2344,10 +2467,17 @@ export async function buildProjectIndexIncremental(projectRoot, rawOpts) {
|
|
|
2344
2467
|
const cacheSig = await moduleCacheSignatureForFile(file, sigInfo, opts, resolverEnvironmentFingerprint);
|
|
2345
2468
|
cached = tryLoadFromCache(projectRoot, file, cacheSig, opts, report);
|
|
2346
2469
|
}
|
|
2347
|
-
if (cached) {
|
|
2470
|
+
if (cached?.importLookupIncomplete) {
|
|
2471
|
+
// See collectStaleCachedModules: extract this importer again. Its own file facts stay valid, so the
|
|
2472
|
+
// project scan reads them from the cached module instead of parsing the file.
|
|
2473
|
+
primeReusedFileFacts(file, cached, opts);
|
|
2474
|
+
changedFiles.add(file);
|
|
2475
|
+
}
|
|
2476
|
+
else if (cached) {
|
|
2348
2477
|
if (fileReport)
|
|
2349
2478
|
fileReport.cached = (fileReport.cached ?? 0) + 1;
|
|
2350
2479
|
modules.set(fileIdentityKey(file), cached);
|
|
2480
|
+
primeReusedFileFacts(file, cached, opts);
|
|
2351
2481
|
collectJsonDependencies(cached.imports, jsonDependencies);
|
|
2352
2482
|
if (bloomFilterCache) {
|
|
2353
2483
|
const persistedFilter = persistedBloomFilters?.get(file, sigInfo);
|
|
@@ -2433,7 +2563,7 @@ export async function buildProjectIndexIncremental(projectRoot, rawOpts) {
|
|
|
2433
2563
|
fileReport.parsed = (fileReport.parsed ?? 0) + 1;
|
|
2434
2564
|
const support = supportForFile(file, opts?.languageExtensions);
|
|
2435
2565
|
if (!support)
|
|
2436
|
-
return [file,
|
|
2566
|
+
return [file, unparsedModuleIndex(file)];
|
|
2437
2567
|
const matchPath = support.id === "ts" || support.id === "tsx" ? await loadMatchPathForFile(file) : undefined;
|
|
2438
2568
|
const built = await buildIndexedModuleForFile({
|
|
2439
2569
|
file,
|
|
@@ -2463,7 +2593,7 @@ export async function buildProjectIndexIncremental(projectRoot, rawOpts) {
|
|
|
2463
2593
|
}
|
|
2464
2594
|
recordFileFailure(report, file, error);
|
|
2465
2595
|
logWithLevel(opts?.logLevel, "warn", `Warning: Failed to process file ${file}:`, error);
|
|
2466
|
-
return [file,
|
|
2596
|
+
return [file, failedModuleIndex(file), undefined];
|
|
2467
2597
|
}
|
|
2468
2598
|
finally {
|
|
2469
2599
|
if (opts?.onProgress) {
|