eigenlsp: scopes past MAX_FN_SCOPES (256) are silently dropped; rename then edits shadowed locals
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start in build_scopes in src/eigenlsp.c and trace how the scope count is returned and consumed by rename resolution. Add a regression test with more than 256 scopes, then run the rename path and execute the renamed program. Done means scope handling no longer silently loses late scopes and a late same-named parameter remains untouched.
Written by the indexing model from the issue text.
Description
Found by /code-review on PR #1330. The limit itself predates that PR, but #1330 makes it bite sooner.
build_scopes in src/eigenlsp.c stops recording scopes after MAX_FN_SCOPES (256), with no warning; the returned count is simply lower. #1330 gives each lambda a scope too, so lambdas now use slots from the same budget as define and for.
In a file with ~200 defines and ~60 early lambdas, the later defines get no scope. Renaming a global x then also rewrites a later define g(x): signature and body, and a later local x resolves to the global. That is a silent wrong edit.
Done when
- The scope table grows as needed (no fixed cap), or rename refuses with an error when the limit is reached rather than guessing.
- A test: a file with more than 256 scopes, where a rename of a global leaves a late
define's same-named parameter untouched (checked by running the renamed program).
- Dominant language
- C
- Stars
- 3
- Forks
- 7
- Avg merge
- 3h 56m
- Merged PRs (30d)
- 102
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 InauguralSystems/EigenScript
-
area:lint-tooling bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
InauguralSystems/EigenScript#1340 ·
Maintainers usually reply within 1 day
-
area:stdlib found-by:code-review kind:silent-wrong
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
InauguralSystems/EigenScript#1338 ·
Maintainers usually reply within 1 day
-
area:lint-tooling found-by:critic kind:docs-drift
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
InauguralSystems/EigenScript#1335 ·
Maintainers usually reply within 1 day
-
area:ci found-by:critic kind:gate-defect
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
InauguralSystems/EigenScript#1311 ·
Maintainers usually reply within 1 day
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetOpenarea:gates found-by:critic kind:decision
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
InauguralSystems/EigenScript#1280 · 1 comment ·
Maintainers usually reply within 1 day
All issues in InauguralSystems/EigenScript
Similar issues
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFileOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BasedHardware/omi#19047 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
obsproject/obs-studio#13936 · 2 comments ·
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day