Perl: cross-file method resolution and accessor typing (Moose, Mojo::Base)

Abierto
#2,949 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
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
c, perl

Línea de trabajo

Start with internal/cbm/lsp/perl_lsp.c and the reference work in #2171, then review the shared cross-file registry used by other language resolvers. Check #2846 for possible tree-sitter-perl node changes. Pick one behavior and add a before/after regression test; done means that behavior resolves correctly from current main with signed-off commits.

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

Descripción

enhancement

Perl call resolution is currently file-local. The Perl semantic pass (internal/cbm/lsp/perl_lsp.c) builds its type registry from the current file's definitions plus the stdlib tables, and there is no cross-file pass for Perl. On current main that leaves these gaps:

  1. Inheritance across files. A method inherited through use parent, use base or @ISA resolves through the semantic pass only when the parent package is defined in the same file.
  2. Accessor typing. Moose and Mojo::Base has attributes are not modelled, so a chain such as $self->ua->get(...) loses its receiver type after the accessor.
  3. require imports. Only top-level use statements produce import rows; require Foo::Bar; (often conditional, or written as require 'Foo/Bar.pm') produces none.
  4. Perl 5.38 class syntax. class / method / field (Corinna) is not handled by the semantic pass.

Reference work: #2171 (thank you, @turtacn) implemented all of these on a September base, with a regression test for each step, and is the best reference for the shape of the work. It could not be merged as it stood (opened from a fork's main, conflicting with current main, unsigned commits), so it was closed; focused slices of it are welcome.

How we would like to land it:

  • One behaviour per PR, cut from current main, with a before/after regression test and signed-off commits (git commit -s).
  • Cross-file resolution should build on the shared cross-file registry the other language resolvers use, rather than a per-file scan of the whole project, so indexing stays linear on large Perl codebases.
  • Related: #2846 (tree-sitter-perl grammar refresh) may change node names this work depends on.

No timeline is implied; this issue keeps the gap visible so it is not lost.

Lenguaje dominante
C
Estrellas
45.8k
Forks
3.8k
Merge medio
2 d 18 h
PR fusionados (30 d)
108

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 DeusData/codebase-memory-mcp

Todos los issues de DeusData/codebase-memory-mcp

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.