Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLens views don't auto-refresh if VS Code is open to a subfolder of a repository #1191

Closed
wiegell opened this issue Nov 19, 2020 · 11 comments
Assignees
Labels
blocked: vscode Caused by or dependent on a VS Code issue or feature blocked Blocked or caused by an upstream issue or feature bug Something isn't working
Milestone

Comments

@wiegell
Copy link

wiegell commented Nov 19, 2020

  • GitLens Version: 11.0.1
  • Git Version: 2.28.0
  • VSCode Version: 1.51.1
  • OS Version: macOS 10.15.4

Steps to Reproduce:

Fetch in either sourceontrol -> changes -> fetch or in terminal and gitlens won't autorefresh even though the option is enabled. Tried disabling, reloading, enabling, reloading to no avail.

The "source-control" expansion panel will react to e.g. commits made from terminal, but "branches" expansion panel will not update and show the green symbol suggesting, that the branch is ahead of remote.
Tried setting "gitlens.outputLevel": "debug", but there is no output.

I also have Git: Autorefresh set to true.

@eamodio eamodio self-assigned this Nov 29, 2020
eamodio added a commit that referenced this issue Nov 29, 2020
Events were missed because listeners were lost by overwriting the repos
@eamodio eamodio added needs-verification Request for community verification bug Something isn't working and removed type: potential bug labels Nov 29, 2020
@eamodio eamodio added this to the Soon™ milestone Nov 29, 2020
@eamodio
Copy link
Member

eamodio commented Nov 29, 2020

Can you please verify this fix in the latest insiders version?

You can install the insiders version from here.

@wiegell
Copy link
Author

wiegell commented Nov 29, 2020

Still not working as intended on:
Screenshot 2020-11-29 at 09 45 12
Before commit:
Screenshot 2020-11-29 at 09 43 24
After commit (still no auto-refresh):
Screenshot 2020-11-29 at 09 43 47
After manual click on refresh:
Screenshot 2020-11-29 at 09 44 00

@eamodio
Copy link
Member

eamodio commented Nov 30, 2020

Can you please enable output channel logging by setting "gitlens.outputLevel": "debug" in your settings. This will enable logging to the GitLens channel in the Output pane. Once enabled, please reproduce the issue and attach the log from the GitLens channel.

Also is there anything else special about your repository? Symlink? Remote? etc?

@wiegell
Copy link
Author

wiegell commented Nov 30, 2020

Yes it's a monorepo using Yarn workspaces.
Gist with output
In this output i'm pushing some commits, then making a new commit. Have not pressed refresh.

@eamodio eamodio added pending-release Resolved but not yet released to the stable edition and removed pending-release Resolved but not yet released to the stable edition needs-verification Request for community verification labels Dec 4, 2020
@eamodio
Copy link
Member

eamodio commented Dec 12, 2020

@wiegell Thanks for those logs -- I'm not seeing the filesystem watcher events triggering so it makes me think we might be hitting: microsoft/vscode#3025.

I've added more logging in tomorrow's insiders edition. Can you install it from here. But be sure to disable/uninstall the stable version of GitLens first.

And then send me the logs from the start of a vscode session -- I want to look at GitLens' repository discovery logs.

@wiegell
Copy link
Author

wiegell commented Dec 12, 2020

Thanks for the effort. I'm now on:
image
Had one non-pushed commit, then made a commit, but didn't have branch pane open. Opened the pane, but that seemed to do an autorefresh (so correctly said two commits ahead), then did third commit, that didn't autorefresh:
Gist

@eamodio
Copy link
Member

eamodio commented Dec 16, 2020

@wiegell yeah, so this is what I thought:

[2020-12-12 10:44:04:503] Repository[monorepo(/users/XXXXXXXX/programmering/angproj/monorepo/)] doesn't support file watching; path=/Users/XXXXXXXX/programmering/angproj/monorepo, workspaceFolders=/Users/XXXXXXXX/programmering/angproj/monorepo/packages/angular

So it looks like you are opening the /Users/XXXXXXXX/programmering/angproj/monorepo/packages/angular folder in vscode, but the repo is the parent (e.g. outside of that folder): /Users/XXXXXXXX/programmering/angproj/monorepo

GitLens (at least in the Repositories view) will detect this and show an indicator in the UI (although its easy to miss):

image

And unfortunately, VS Code only supports file watching of files/folders inside the workspace/folder it was opened to. See microsoft/vscode#3025.

So unfortunately there isn't much I can do here.

@eamodio eamodio changed the title "Gitlens › Views › Repositories: Auto Refresh" not working GitLens views don't auto-refresh if vscode is open to a subfolder of a repository Dec 16, 2020
@eamodio eamodio changed the title GitLens views don't auto-refresh if vscode is open to a subfolder of a repository GitLens views don't auto-refresh if VS Code is open to a subfolder of a repository Dec 16, 2020
@eamodio eamodio added blocked Blocked or caused by an upstream issue or feature blocked: vscode Caused by or dependent on a VS Code issue or feature labels Dec 16, 2020
@eamodio eamodio modified the milestones: Soon™, Soonish™, Backlog Dec 16, 2020
@wiegell
Copy link
Author

wiegell commented Dec 22, 2020

@eamodio
Ok, thanks for the effort anyway. So if i understand the situation correctly, gitlens would work, if i had my vs-code workspace in the monorepos root folder - right?
Anyway thats not what i want, since i use custom settings for each sub-repo. Custom settings are not supported with vs-code multi-root workspaces either, which i suspect could be the suggested "solution" from microsoft.

@wiegell wiegell closed this as completed Dec 22, 2020
@wiegell
Copy link
Author

wiegell commented Dec 22, 2020

image

Also - is this an outdated image? Cant' get this view neither in "source control" or regular gitlens view.

@eamodio
Copy link
Member

eamodio commented Dec 24, 2020

Not old, but only shows on the Repositories view -- I probably need to add some indicator to the other views as well.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: vscode Caused by or dependent on a VS Code issue or feature blocked Blocked or caused by an upstream issue or feature bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants