The "Rename Symbol" code action fails to account for constructor/destructor tags
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start at the VS Code "Rename Symbol" code action and reproduce the issue with the Lean inductive-type snippet in the report. Trace how constructor and destructor references are selected and qualified; done means renaming the inductive type updates all references and renaming mrow or hiss preserves the appropriate . or Meow. qualification.
Written by the indexing model from the issue text.
Description
The "Rename Symbol" code action in VS Code seems to have issues with inductive types.
inductive Meow where
| mrow
| hiss
def foo : Meow -> Unit
| .mrow => ()
| Meow.hiss => ()
def bar := Meow.mrow
Placing the cursor on Meow in inductive Meow and renaming the symbol will rename it in : Meow, but leave the original symbol name in all destructors and constructors (| Meow.hiss, := Meow.mrow).
Placing the cursor on | mrow in inductive Meow and renaming the symbol (ex. to baz) will incorrectly rename it to | baz (missing the . prefix) in def foo and := baz in def bar (missing the Meow. prefix).
Placing the cursor on .mrow or Meow.hiss in def foo and renaming the symbol will let you rename the whole symbol (i.e. .mrow, Meow.hiss), rather than just the intended mrow or hiss.
vscode-lean4: 0.0.239
lean-toolchain: leanprover/lean4:v4.34.0
Fedora 44
- Dominant language
- TypeScript
- Stars
- 327
- Forks
- 109
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 12
Getting set up
- No 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 leanprover/vscode-lean4
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
leanprover/vscode-lean4#841 ·
Maintainers usually reply within 2 days
-
Completion popup reopens after Esc in Lean files; caused by default quickSuggestionsDelay of 200Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
leanprover/vscode-lean4#800 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
leanprover/vscode-lean4#817 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
leanprover/vscode-lean4#796 · 9 comments ·
Maintainers usually reply within 2 days
-
RFC
Difficulty 5/5 Over a week Newbie friendliness 35/100
leanprover/vscode-lean4#790 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
All issues in leanprover/vscode-lean4
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
laststance/design-world#98 ·
Maintainers usually reply within 1 day
-
Add: KCM True crimeOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
triage: failed
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
oxc-project/tsrs#1277 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ardia-browser/ardia#6798 ·
Maintainers usually reply within 1 day