Perl: cross-file method resolution and accessor typing (Moose, Mojo::Base)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
Research direction
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.
Written by the indexing model from the issue text.
Description
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:
- Inheritance across files. A method inherited through
use parent,use baseor@ISAresolves through the semantic pass only when the parent package is defined in the same file. - Accessor typing. Moose and Mojo::Base
hasattributes are not modelled, so a chain such as$self->ua->get(...)loses its receiver type after the accessor. requireimports. Only top-levelusestatements produce import rows;require Foo::Bar;(often conditional, or written asrequire 'Foo/Bar.pm') produces none.- 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.
- Dominant language
- C
- Stars
- 45.8k
- Forks
- 3.8k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 108
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DeusData/codebase-memory-mcp
-
bug ux/behavior
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DeusData/codebase-memory-mcp#3191 ·
Maintainers usually reply within 1 day
-
documentation enhancement parsing/quality ux/behavior
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
DeusData/codebase-memory-mcp#3131 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
hook-augment: the five-row cap keeps the first five search_graph rows, so variables and modules displace function definitions (v0.12.1)Possibly taken A pull request linked to this issue is open or already merged. Openbug editor/integration parsing/quality ux/behavior
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
DeusData/codebase-memory-mcp#3062 · 2 comments ·
Maintainers usually reply within 1 day
-
bug documentation editor/integration parsing/quality
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
DeusData/codebase-memory-mcp#3050 · 1 comment ·
Maintainers usually reply within 1 day
-
editor/integration parsing/quality
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DeusData/codebase-memory-mcp#2286 ·
Maintainers usually reply within 1 day
All issues in DeusData/codebase-memory-mcp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Maintainers usually reply within 1 day
-
iOS: the "Edit controls" button never hides, even with a controller connected, and covers the gameOpengame: 010065A014024000 ios
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
seedds/nxnative#3714 · 1 comment ·
Maintainers usually reply within 2 days