-
Notifications
You must be signed in to change notification settings - Fork 645
gorename path error - file not found when git diff in windows path #665
Comments
Can you share your GOPATH if you have set any in the settings ? If not then share the GOPATH from your environment variables.
Also, can you share the complete error message? Does it start with "Cannot rename due to errors..." ? |
the complete error message is as shown. I did a copy/paste. it is preceded by a red "error" box note that "project name" is a directory name which has a real space between two words as shown. application\src\mypackagename/*.go space in path proven not to make a difference |
If you didnt see the error message Do you see any errors in the console? Open Does this happen on all of your Go projects? |
from the debug console:
all of my projects are under this directory structure, and are all experiencing this problem. |
The slash before the quotes is the problem. I know you mentioned that earlier, but the error message you pasted didnt have the slash, so I didnt make the connection. Since I can't repro this, can you download the code for the Go extension and debug locally? Close all instances of VS Code and run the below in your command prompt
|
this is great - I have followed your instructions. the filePatch.fileName has the slash in front..
would it be helpful to set up a chat to work through this? |
I have moved the breakpoint up to buildTags.. it is returning the following:
I have checked all of my workspace and user settings.json files.. I have nothing like this. I've cleared the settings files and still get it. |
buildTags doesn't matter. You say you see the slash in the front, but what you pasted doesn't have it. Are you sure?
Add a breakpoint at line 26 and check what is the value of |
the forward slash was actually there, but github mistook it for markup!!! I changed it to "code" so it would show up.. sorry |
It has been shown that when git for windows is installed in the standard windows path, the vscode-go integrated gorename function breaks due to a slight difference in output from other diff implementations. changes to support a diff string with quotes around the file path is requested. |
I had this exact problem. Thanks to your research it quickly led to the reason: I had the Cygwin tools bundled This leads me to wonder, if there are multiple incompatible versions of Perhaps a setting entry like |
I'm thinking that any hidden dependency on other tools in the path is just bad practice. this has been sitting out here without action for a while now. |
I'll pick this up for the next update in March |
Logged kpdecker/jsdiff#171 for the root cause. Sorry this took a while :( |
The latest update (0.6.56) to the Go extension has the fix to this issue |
attempting to perform a "rename symbol", I am getting the following error:
File not found (\"C:\Users<valid path>\file.go")
this happens on workspace or individual file settings.
I've tried changing the environment variables to remove the C: but everything stops working then.
note the backslash before the quote.
cannot seem to find any other settings that impact this.
windows 10
VSCODE 1.7.2
NODE 6.5
extension version: 0.6.50 - 21st November, 2016
The text was updated successfully, but these errors were encountered: