jackfirth / jackfirth/resyntax
Definition context conflict logic is overly conservative
Open
Nobody has claimed this yet.
bug
existing lint
- Dominant language
- Racket
- Stars
- 70
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
This test should pass:
#lang resyntax/private/refactoring-test
require: resyntax/default-recommendations let-binding-suggestions
header:
- #lang racket/base
test: "shadowed bindings in parent definition contexts don't prevent let-to-define refactoring"
--------------------
(define (f)
(define x 1)
(define (g)
(let ([x 1])
x))
g)
--------------------
--------------------
(define (f)
(define x 1)
(define (g)
(define x 1)
x)
g)
--------------------
But instead, Resyntax leaves the code unchanged. This is probably related to the changes in #344.
Contributor 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.
Research direction
Start by running or adding the regression test shown in the issue, then inspect the definition-context conflict logic and compare it with the changes in #344. Done means the test passes and the nested let-to-define refactoring produces the expected define form without being blocked by the shadowed parent binding.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100