gitnexus 1.6.3-rc.37 → 1.6.3-rc.39

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.
@@ -5,6 +5,7 @@ import { generateId } from '../../lib/utils.js';
5
5
  import { getLanguageFromFilename, SupportedLanguages } from '../../_shared/index.js';
6
6
  import { extractVueScript, isVueSetupTopLevel } from './vue-sfc-extractor.js';
7
7
  import { yieldToEventLoop } from './utils/event-loop.js';
8
+ import { isVerboseIngestionEnabled } from './utils/verbose.js';
8
9
  import { getDefinitionNodeFromCaptures, findEnclosingClassInfo, getLabelFromCaptures, CLASS_CONTAINER_TYPES, } from './utils/ast-helpers.js';
9
10
  import { detectFrameworkFromAST } from './framework-detection.js';
10
11
  import { buildTypeEnv } from './type-env.js';
@@ -223,7 +224,8 @@ function seqGetFieldInfo(classNode, provider, context) {
223
224
  const processParsingSequential = async (graph, files, symbolTable, astCache, scopeTreeCache, onFileProgress) => {
224
225
  const parser = await loadParser();
225
226
  const total = files.length;
226
- const skippedLanguages = new Map();
227
+ const logSkipped = isVerboseIngestionEnabled();
228
+ const skippedByLang = logSkipped ? new Map() : null;
227
229
  for (let i = 0; i < files.length; i++) {
228
230
  const file = files[i];
229
231
  // Reset memoization before each new file (node refs are per-tree)
@@ -238,9 +240,10 @@ const processParsingSequential = async (graph, files, symbolTable, astCache, sco
238
240
  const language = getLanguageFromFilename(file.path);
239
241
  if (!language)
240
242
  continue;
241
- // Skip unsupported languages (e.g. Swift when tree-sitter-swift not installed)
242
243
  if (!isLanguageAvailable(language)) {
243
- skippedLanguages.set(language, (skippedLanguages.get(language) || 0) + 1);
244
+ if (skippedByLang) {
245
+ skippedByLang.set(language, (skippedByLang.get(language) ?? 0) + 1);
246
+ }
244
247
  continue;
245
248
  }
246
249
  // Skip files larger than the max tree-sitter buffer (32 MB)
@@ -534,11 +537,10 @@ const processParsingSequential = async (graph, files, symbolTable, astCache, sco
534
537
  }
535
538
  });
536
539
  }
537
- if (skippedLanguages.size > 0) {
538
- const summary = Array.from(skippedLanguages.entries())
539
- .map(([lang, count]) => `${lang}: ${count}`)
540
- .join(', ');
541
- console.warn(` Skipped unsupported languages: ${summary}`);
540
+ if (skippedByLang && skippedByLang.size > 0) {
541
+ for (const [lang, count] of skippedByLang.entries()) {
542
+ console.warn(`[ingestion] Skipped ${count} ${lang} file(s) in parsing processing — ${lang} parser not available.`);
543
+ }
542
544
  }
543
545
  };
544
546
  // ============================================================================
@@ -287,31 +287,47 @@ const findEnclosingFunctionId = (node, filePath, provider) => {
287
287
  }
288
288
  // Qualify with enclosing class to match definition-phase node IDs
289
289
  const classInfo = cachedFindEnclosingClassInfo(current, filePath, provider.resolveEnclosingOwner);
290
- const qualifiedName = classInfo ? `${classInfo.className}.${funcName}` : funcName;
290
+ const encLang = getLanguageFromFilename(filePath);
291
+ const standaloneMethodInfo = (finalLabel === 'Method' || finalLabel === 'Constructor') &&
292
+ encLang === SupportedLanguages.Go &&
293
+ provider.methodExtractor?.extractFromNode
294
+ ? provider.methodExtractor.extractFromNode(current, {
295
+ filePath,
296
+ language: encLang,
297
+ })
298
+ : null;
299
+ const ownerName = classInfo?.className ?? standaloneMethodInfo?.receiverType ?? undefined;
300
+ const qualifiedName = ownerName ? `${ownerName}.${funcName}` : funcName;
291
301
  // Include #<arity> suffix to match definition-phase Method/Constructor IDs.
292
302
  // Use the same MethodExtractor (getMethodInfo) as the definition phase.
293
303
  // When same-arity collisions exist, also append ~type1,type2.
294
304
  let arity;
295
305
  let encTypeTag = '';
296
306
  if (finalLabel === 'Method' || finalLabel === 'Constructor') {
297
- const encLang = getLanguageFromFilename(filePath);
298
- const classNode = findEnclosingClassNode(current) ?? findClassNodeByQualifiedName(current);
299
- if (classNode && encLang) {
300
- const methodMap = getMethodInfo(classNode, provider, {
301
- filePath,
302
- language: encLang,
303
- });
304
- const defLine = current.startPosition.row + 1;
305
- const info = methodMap?.get(`${funcName}:${defLine}`);
306
- if (info) {
307
- arity = info.parameters.some((p) => p.isVariadic)
308
- ? undefined
309
- : info.parameters.length;
310
- if (methodMap && arity !== undefined) {
311
- const g = buildCollisionGroups(methodMap);
312
- encTypeTag =
313
- typeTagForId(methodMap, funcName, arity, info, encLang, g) +
314
- constTagForId(methodMap, funcName, arity, info, g);
307
+ if (standaloneMethodInfo) {
308
+ arity = standaloneMethodInfo.parameters.some((p) => p.isVariadic)
309
+ ? undefined
310
+ : standaloneMethodInfo.parameters.length;
311
+ }
312
+ else {
313
+ const classNode = findEnclosingClassNode(current) ?? findClassNodeByQualifiedName(current);
314
+ if (classNode && encLang) {
315
+ const methodMap = getMethodInfo(classNode, provider, {
316
+ filePath,
317
+ language: encLang,
318
+ });
319
+ const defLine = current.startPosition.row + 1;
320
+ const info = methodMap?.get(`${funcName}:${defLine}`);
321
+ if (info) {
322
+ arity = info.parameters.some((p) => p.isVariadic)
323
+ ? undefined
324
+ : info.parameters.length;
325
+ if (methodMap && arity !== undefined) {
326
+ const g = buildCollisionGroups(methodMap);
327
+ encTypeTag =
328
+ typeTagForId(methodMap, funcName, arity, info, encLang, g) +
329
+ constTagForId(methodMap, funcName, arity, info, g);
330
+ }
315
331
  }
316
332
  }
317
333
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexus",
3
- "version": "1.6.3-rc.37",
3
+ "version": "1.6.3-rc.39",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",