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

Inline diff is not displayed #198

Closed
artem701 opened this issue Mar 23, 2023 · 10 comments · Fixed by #199
Closed

Inline diff is not displayed #198

artem701 opened this issue Mar 23, 2023 · 10 comments · Fixed by #199

Comments

@artem701
Copy link

Inline diff view and change indicators stopped working recently (couple of weeks ago maybe) while changes in working directory still can be viewed.

The behaviour I got (right tab is working directory changes for comparison):
image

The expected behaviour is as in git extensions (which was fine until some recent update):
image

Tried reinstalling the extension, but it didn't help. Also I don't remember messing with extension's or mercurial's settings.

@marcatec
Copy link

marcatec commented Mar 24, 2023

I have the same issue. The gutter indicators stopped working and they are crucial to me.
I am on Windows, on Linux the problem seams to not appear.
Disabling all other extensions didn't help.
A downgrade of VSCode from 1.76 back to 1.75 helped, but but I hope the issue can be resolved.

@artem701
Copy link
Author

By the way, on my side the bug is also happening on Windows, VSCode version 1.76.2. And switching to 1.75.1 helped, thanks @marcatec.

@gbmahili
Copy link

Yeah, I am getting the same issue. Switching to 1.75.1 (https://update.code.visualstudio.com/1.75.1/win32-x64-user/stable) helped me (Windows 10)

@alexr00
Copy link
Contributor

alexr00 commented Mar 27, 2023

👋 @mrcrowl, I'm a developer on VS Code and I made the change that caused this breakage. Here's what's happening now:

  1. I made a change to how quick diff works such that if the quick diff provider has a root URI we filter to only quick diff providers where that URI is a parent or equal to the file we want to get quick diffs for. The old behavior took any quick diffs, even if the root URI didn't match
  2. On this line, you create the root URI that is used for the quick diffs:

    vscode-hg/src/repository.ts

    Lines 608 to 609 in 795ed52

    Uri.parse(repository.root)
    );
  3. This works fine on linux and macOS, but on Windows, using Uri.parse causes the scheme of the URI to be set incorrectly. The best way to get file Uris is to do Uri.file instead. I don't know where else in SCM this root URI gets used, but if you have any longstanding Windows issues in the extension then this could be the cause.

@mrcrowl, if you're willing to make the fix to vscode-hg that would be ideal; however, we also don't want to break extensions. I can see if there's a change I can make in VS Code to work around the incorrect root URI if you can't make the change in vscode-hg.

@gbmahili
Copy link

👋 @mrcrowl, I'm a developer on VS Code and I made the change that caused this breakage. Here's what's happening now:

  1. I made a change to how quick diff works such that if the quick diff provider has a root URI we filter to only quick diff providers where that URI is a parent or equal to the file we want to get quick diffs for. The old behavior took any quick diffs, even if the root URI didn't match
  2. On this line, you create the root URI that is used for the quick diffs:

    vscode-hg/src/repository.ts

    Lines 608 to 609 in 795ed52

    Uri.parse(repository.root)
    );
  3. This works fine on linux and macOS, but on Windows, using Uri.parse causes the scheme of the URI to be set incorrectly. The best way to get file Uris is to do Uri.file instead. I don't know where else in SCM this root URI gets used, but if you have any longstanding Windows issues in the extension then this could be the cause.

@mrcrowl, if you're willing to make the fix to vscode-hg that would be ideal; however, we also don't want to break extensions. I can see if there's a change I can make in VS Code to work around the incorrect root URI if you can't make the change in vscode-hg.

@alexr00 - Can you please make these changes in the next VSC release as we wait for the ones here to be made? Thank you in advance.

@alexr00
Copy link
Contributor

alexr00 commented Mar 28, 2023

After discussing with others on the VS Code team, we've decided not to make any VS Code change to unblock quick diffs in Mercurial. There's definitely a bug in the extension, it was just more hidden before. Any change we make in VS Code for this is just a work around and wouldn't fix whatever other issues this path bug is causing in the extension.

I've created a PR here to make the change needed for Mercurial to get quick diffs again: #199

If you need quick diffs immediately I would recommend downgrading the version of VS Code you're using to 1.74.

@incidentist
Copy link
Collaborator

Thanks for looking into this @alexr00. I should be able to look at the PR this week.

@BCGST
Copy link

BCGST commented Apr 13, 2023

@incidentist any update on this? I am also am interested in how this bug might be resolved.

incidentist added a commit that referenced this issue Apr 14, 2023
@incidentist
Copy link
Collaborator

@BCGST Sorry about the delay! I just merged a fix. @mrcrowl Can you release version 1.9.0 on master? It should be all set to go.

@alexr00 Thank you so much for the explanation and the PR!

@mrcrowl
Copy link
Owner

mrcrowl commented Apr 14, 2023

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants