You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Rename Symbol" often fails to rename when using Rope #52
I can verify this is an issue. Using the following code:
deffxn():
B=42Y=B+13returnB+Y
I just simply tried renaming B multiple times in a row and after about 3 times it started to work about every other time. Not sure if this is our doing or Rope's doing.
Brett Cannon (@brettcannon) I understand. Hm. When it misses the next time, is there any way I troubleshoot it and investigate whether it is rope's fault?
EDIT: And by the way, thanks for an absolutely fantastic product. I live and breathe Python in vscode at least 8hrs a day 😉
Kartik Raj (@karrtikr) - I notice that you closed that other issue, saying it is working as desired. VSCode gives no explanation for why the rename failed. That hardly seems like desirable behavior.
Andrii Boichuk (@ThatAIGeek) there's nothing really to fix directly; Rope simply failed and we don't control Rope. Please try the language server to see if it's renaming support works for you (see #3977 for instructions on how to do that).
Kyle Delaney (@v-kydela) as I mention above, Rope only provides us so much. Please try the language server to see if it does the renaming you want as that we do control and can fix.
fireattack Correct, disabling Jedi will activate the language server. It's related to Rope because the language server subsumes functionality of Jedi, Rope, and Pylint for the extension. So if you turn on the language server we do not use Jedi or Rope and we stop prompting you to install Pylint to get syntax errors and such (but it will still run, it's just more of an opt-in thing).
Activity
brettcannon commentedon Dec 20, 2017
I can verify this is an issue. Using the following code:
I just simply tried renaming
Bmultiple times in a row and after about 3 times it started to work about every other time. Not sure if this is our doing or Rope's doing.puzzler10 commentedon Mar 9, 2018
Actually, when I tried doing rename on that code (changing B to O) it went from
to
deleting a line completely.
brettcannon commentedon Mar 9, 2018
Tom Roth (@puzzler10) can you open a new issue?
fredrikaverpil commentedon Apr 25, 2018
I'm on the latest vscode (to date) and I find renaming symbols is a "hit or miss" feature. Feels like there's a 50% chance it works with Python code.
brettcannon commentedon Apr 25, 2018
Fredrik Averpil (@fredrikaverpil) the trickiness with this is knowing whether this is our fault or rope not working properly.
fredrikaverpil commentedon Apr 25, 2018
Brett Cannon (@brettcannon) I understand. Hm. When it misses the next time, is there any way I troubleshoot it and investigate whether it is rope's fault?
EDIT: And by the way, thanks for an absolutely fantastic product. I live and breathe Python in vscode at least 8hrs a day 😉
brettcannon commentedon Apr 25, 2018
Fredrik Averpil (@fredrikaverpil) not at the moment; we have #1131 for adding logging throughout the extension as that's a major shortcoming we have.
And thanks for the compliment!
24 remaining items
BBI-DiWang commentedon Apr 11, 2019
same issue, can not solve it. "find all references" stopped working as well.
brettcannon commentedon Apr 11, 2019
We're actively working to getting renaming working with our new language server which should replace our need to rely on Rope.
calvin620707 commentedon Apr 12, 2019
I already disabled Jedi and using language server. Is this the reason why I can't use rename with rope?
BBI-DiWang commentedon Apr 12, 2019
I added
python.jediEnabled": truein thesettings.json, temporary solution.brettcannon commentedon Apr 12, 2019
Calvin Wu (@calvin620707) correct, but the new language server has built-in support (at least in the beta channel as of version 0.2.53).
karrtikr commentedon Apr 17, 2019
FAIL CASE
Rename Symbol ALWAYS fails without error when NO WORKSPACE FOLDER is open. (#5301)
ThatAIGeek commentedon Jul 2, 2019
Are there any plans to fix this? I'm still getting this with Version: 1.35.1
v-kydela commentedon Jul 2, 2019
Kartik Raj (@karrtikr) - I notice that you closed that other issue, saying it is working as desired. VSCode gives no explanation for why the rename failed. That hardly seems like desirable behavior.
brettcannon commentedon Jul 3, 2019
Andrii Boichuk (@ThatAIGeek) there's nothing really to fix directly; Rope simply failed and we don't control Rope. Please try the language server to see if it's renaming support works for you (see #3977 for instructions on how to do that).
Kyle Delaney (@v-kydela) as I mention above, Rope only provides us so much. Please try the language server to see if it does the renaming you want as that we do control and can fix.
fireattack commentedon Jul 3, 2019
I'm a little confused. So disabling
Jediwill enable language server instead, right? But how it's related torope? AreropeandJedithe same thing?brettcannon commentedon Jul 3, 2019
fireattack Correct, disabling Jedi will activate the language server. It's related to Rope because the language server subsumes functionality of Jedi, Rope, and Pylint for the extension. So if you turn on the language server we do not use Jedi or Rope and we stop prompting you to install Pylint to get syntax errors and such (but it will still run, it's just more of an opt-in thing).
brettcannon commentedon Jul 29, 2019
Closing as this is an upstream issue which we don't have direct control or influence over.