feat: resolve references by path across languages

Abierto
#249 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, kotlin, ruby
Área
backend

Línea de trabajo

Start with the UnresolvedRef struct in internal/indexer/goextract/types.go near line 118, then compare it with the emitters in kotlinextract.go:146 and rubyextract.go:148 to see the shared shape. The open question is whether path resolution uses one Addressing kind or one per target, and that design choice comes before any code. Done means path-named references get edges in callers, callees and impact output while unmatched paths stay unresolved and no existing field changes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area:indexer enhancement priority:low
What exists today?

The Go extractor emits unresolved references as UnresolvedRef in internal/indexer/goextract/types.go:118. The struct has Name, PkgAlias and Kind, and no field for a path.

How does it behave now?

Every language extractor emits the same UnresolvedRef with Name and PkgAlias only. Examples: internal/indexer/mainstream/kotlinextract/kotlinextract.go:146 and internal/indexer/mainstream/rubyextract/rubyextract.go:148.

A string that names a file, a route, a template or a config key has no path field. The index has no way to link it to the file that defines it.

The Addressing field named in the follow-up to #198 is not in the tree at 834d3247. rg -n Addressing returns no match.

How should it behave?

An unresolved reference that names a path resolves to the file that defines it. For example, a Go call that loads templates/user.html links to that template file.

A path that matches no file stays unresolved, as it does today.

Whether one Addressing value covers route handlers, templates and config keys, or each one gets its own kind, is open.

What kind of improvement?

Other: cross-language edges that the index misses today.

Would this change existing behavior?

Yes. Path-named references gain new edges in callers, callees and impact output. Agents consume these shapes. The new edges must be additive. No field can be renamed or removed.

Before submitting
  • I searched existing issues and this is not a duplicate
  • I checked that the current behavior is not a deliberate decision in openspec/specs/

Related: #198. Its index-invariants change proposal is on branch feat/198-index-invariants.

Lenguaje dominante
Go
Estrellas
0
Forks
0
Merge medio
7 h 42 min
PR fusionados (30 d)
111

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de seanb4t/codegraph-go

Todos los issues de seanb4t/codegraph-go

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.