Open gregviolette opened 10 months ago
Try right clicking on the SCM title (Source control), in the revealed menu select Stashes to enable the view. If that entry doesn't appear, verify that the Explorer: Enabled setting is active.
Same problem here, under Linux. The explorer doesn't appear and that entry doesn't exist. Enabled setting is On by default. Extension log file is totally empty. Added a keybinding to Toggle Explorer and that doesn't do anything either.
I think I figured it out. I ran the extension in a debug session and got a stacktrace:
rejected promise not handled within 1 second: Error: ENOENT: no such file or directory, stat '/home/user/projects/test/does-not-exist'
stack trace: Error: ENOENT: no such file or directory, stat '/home/user/projects/test/does-not-exist'
at statSync (node:fs:1615:3)
at t.statSync (node:electron/js2c/asar_bundle:2:4557)
at /home/user/git/vscode-gitstash/dist/extension.js:6965:28
at Array.forEach (<anonymous>)
at Workspace.getSubdirectoriesTree (/home/user/git/vscode-gitstash/dist/extension.js:6962:38)
at /home/user/git/vscode-gitstash/dist/extension.js:6933:46
at Array.forEach (<anonymous>)
at Workspace.getSubRootPaths (/home/user/git/vscode-gitstash/dist/extension.js:6932:24)
at Workspace.getRootPaths (/home/user/git/vscode-gitstash/dist/extension.js:6894:30)
at WorkspaceGit.getRepositories (/home/user/git/vscode-gitstash/dist/extension.js:5983:47)
at activate (/home/user/git/vscode-gitstash/dist/extension.js:7287:80)
at H._callActivateOptional (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:136:16961)
at H._callActivate (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:136:16631)
at /usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:136:14456
at async w._activate (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:7861)
at async w._waitForDepsThenActivate (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:7803)
at async w._initialize (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:7167)
The problem is caused by a stashed commit referencing a folder that doesn't exist anymore. Recreating the missing folder makes everything work correctly. Code should be fixed to ignore stat errors.
@res359 Thank you very much for taking time to debug it on you side. I'll update the extension as soon as got some free time.
@res359 Could you tell me the steps to reproduce it, including any custom settings? I'd rather fix after reproducing it than just blindly fixing it based on the trace.
@artrz Turns out I was slightly mistaken. The problem is simply caused by having a broken symlink in your repository folder. Just create one with ln -s foobar test
. It doesn't have to be referenced by a stashed commit. The extension will stop working immediately.
@gregviolette originally reported the problem under Windows and not Linux, so I wonder if it's the same issue even.
Ah that makes sense @res359! Tried using directories and wasn't unable to reproduce. While I don't expect the symlink thing to fix the issue from OP still a bug so I'll fix it soon.
@gregviolette could you start a debug session on your side to catch any possible trace? I already found a possible issue but not sure if related to you case.
I have this extension installed on my Ubuntu VM and it works fine. But when I installed it on my Windows 11 VS Code, I don't see the "STASHES" panel in the Explorer. What am I doing wrong?