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

Gutter indicators not working after updating to 1.90.0-insiders #212857

Closed
Tracked by #212907
rary21 opened this issue May 16, 2024 · 12 comments · Fixed by #213792
Closed
Tracked by #212907

Gutter indicators not working after updating to 1.90.0-insiders #212857

rary21 opened this issue May 16, 2024 · 12 comments · Fixed by #213792
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders scm General SCM compound issues verified Verification succeeded
Milestone

Comments

@rary21
Copy link

rary21 commented May 16, 2024

Does this issue occur when all extensions are disabled?: Yes (but with WSL to open a repo in WSL)

  • VS Code Version: Version: 1.90.0-insider (user setup)
    Commit: 5e68ffd
    Date: 2024-05-15T08:29:12.858Z
    Electron: 29.3.1
    ElectronBuildId: 9464424
    Chromium: 122.0.6261.156
    Node.js: 20.9.0
    V8: 12.2.281.27-electron.0
    OS: Windows_NT x64 10.0.22621
  • OS Version: Windows 11 Enterprise
    Version 22H2
    OS Build 22621.3447
    Windows Feature Experience Pack 1000.22688.1000.0

Steps to Reproduce:

  1. Create a git repo with git init
  2. Open the repo, add and modify files.
  3. Open modified file in VSCode

I also tested with newly installed VSCode and it worked fine.

What I got

1.90.0-insider

image

1.89.1 (user setup)

Commit: dc96b83
Date: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22621
image

@ngollan
Copy link

ngollan commented May 16, 2024

+1. For me, it so far only happens in a remote environment (both a Linux devcontainer and WSL on a Windows host). A local environment with a small C# project also using git is not affected.

@bmasias1
Copy link

I have the same issue with version 1.90.0-insider. The gutters are not showing when working in a remote environment (WSL). I tested with both new and old repositories, and the problem persists.

@tcatherall
Copy link

This is affecting my team when using Remote SSH connected to a remote container

@ssalbdivad
Copy link

Yeah this has been the first regression that feels bad enough I've just been developing natively on Windows waiting for this to get fixed 😆

@deepeshmittal
Copy link

I am also facing the same issue on 1.90.0-insider version while working on remote container.

@stevealpha20
Copy link

omg, me too!!!!

@BlankShrimp
Copy link

It's been 2 weeks since I firstly encountered this issue. There is an average of 1 update every two days, yet none of them fixed it.

@ssalbdivad
Copy link

@lszomoru Would it be possible to get an idea of the team's stance on this?

I very much appreciate how responsive the VSCode team usually is when addressing regressions. This feels like a very significant one to not have any feedback for two weeks.

@alexr00
Copy link
Member

alexr00 commented May 28, 2024

I've been looking into this today. @lszomoru, I don't even see the git SCM quick diff provider get registered. If I enable it for GHPR, I do see the GHPR quick diff get registered, and GHPR quick diffs do work. I'm wondering if a node update or something caused this, because this line seems suspicious:

this._sourceControl.quickDiffProvider = this;

Is this defined yet if the constructor hasn't completed? Not sure why this would only be an issue when remote though.

@alexr00
Copy link
Member

alexr00 commented May 28, 2024

this is defined. The issue is a timing problem, and I don't know why it has only surfaced now:

const root = Uri.file(repository.root);
this._sourceControl = scm.createSourceControl('git', 'Git', root);
this._sourceControl.quickDiffProvider = this;

  1. On line 869, the source control is created. This looks sync, but actually async stuff happens. Specifically, in the renderer the repository is added to a map on line 480 here:

async $registerSourceControl(handle: number, id: string, label: string, rootUri: UriComponents | undefined, inputBoxDocumentUri: UriComponents): Promise<void> {
// Eagerly create the text model for the input box
const inputBoxTextModelRef = await this.textModelService.createModelReference(URI.revive(inputBoxDocumentUri));
const provider = new MainThreadSCMProvider(this._proxy, handle, id, label, rootUri ? URI.revive(rootUri) : undefined, inputBoxTextModelRef.object.textEditorModel, this.quickDiffService, this._uriIdentService, this.workspaceContextService);
const repository = this.scmService.registerSCMProvider(provider);
this._repositories.set(handle, repository);

  1. Because this is async we don't have a guarantee that by the time you set the quickDiffProvider from the first snippet on line 871 the repository will have been added to that map, so instead of adding the quick diff provider we just return early here:

$updateSourceControl(handle: number, features: SCMProviderFeatures): void {
const repository = this._repositories.get(handle);
if (!repository) {
return;
}

@lszomoru while looking at this, I noticed that the await here was only recently added. That might be the culprit.

const inputBoxTextModelRef = await this.textModelService.createModelReference(URI.revive(inputBoxDocumentUri));

@lszomoru lszomoru added scm General SCM compound issues bug Issue identified by VS Code Team member as probable bug labels May 28, 2024
@lszomoru lszomoru added this to the May 2024 milestone May 28, 2024
@lszomoru
Copy link
Member

Thank you @alexr00. We have made a change to eagerly create the text model for the commit input in order to address a different paper-cut where in some cases the commit input would not get correctly focused. This clearly broke several things (quick diff being only one of them). I have a local repro and will be pushing a fix for this today/tomorrow.

@IOLOII
Copy link

IOLOII commented Jun 11, 2024

If someone is like me, it is accidentally caused for couldn' t see the blue line I mean dirty diff line

It may also not be displayed due to other settings dirty diff line #147352

image

When developing locally, if this is the case, you can check the settings.

image

Check setting.json about below

scm.diffDecorations
scm.diffDecorationsGutterPattern

Just annotate it.

@microsoft microsoft locked and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders scm General SCM compound issues verified Verification succeeded
Projects
None yet