-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Git: Restore diff editors on reload #99290
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
Comments
Yes, +100 !! |
@bpasero What will it take for this to happen? This is a simple diff editor with a git document (from a custom file system) on the left side. I also have a feeling we got this to work recently. 🤔 |
@joaomoreno you need to register an editor input factory for anything you want to restore. |
I am (git is) an extension. Should I assign this to you or @alexdima? |
Oh wait. Ever since you adopted the file system provider API, the editor input factory is already there for you. However, we do not restore diff editors in general currently. Is it safe to assume that a Git URL can simply be opened again in the future? |
Ok. Then this essentially is a duplicate of #18681 |
But that is out of scope 🤔 |
Yeah, I am fine making this a feature request and backlog candidate to see if it gets enough votes. |
So, with 1428d44 pushed, diff editors now have a chance to survive reloads and this works OK unless the diff editor on a git resource is opened as the active one: However, if the diff editor is the active one, I am greeted with:
I think we are trying to restore editors before the extension host is there. @sandy081 @jrieken @alexdima does this ring a bell? I remember we had nasty deadlocks if the editors would wait to restore before the extension host was ready. Is this simply not supported? |
This should work - you can reload successfully with a file from remotes open, e.g with dev containers. This might be because git activates on |
@jrieken yeah good point, though I thought we might be doing something very special for @joaomoreno can you chime in as well how git gets activated? |
I am getting a step closer once I add this to "activationEvents": [
"*",
"onFileSystem:git"
] However reloading then I am presented with the following error which makes me think that maybe the git FS provider is maybe not ready yet?
|
Hm... good work. I can make the git FS provider wait until the git extension is initialized and has scanned the possible repositories. |
Done! 24f1b69 |
Verification:
|
Thanks for doing this. Works nicely. |
Steps to Reproduce:
All other tabs will be opened except git diff changes tab
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: