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

Better handling of start-up errors #93

Open
dimateos opened this issue Apr 17, 2024 · 4 comments
Open

Better handling of start-up errors #93

dimateos opened this issue Apr 17, 2024 · 4 comments

Comments

@dimateos
Copy link
Contributor

dimateos commented Apr 17, 2024

There are a bunch of errors when you open the view before vscode source control has loaded any git repo.
Or when you open (restoring last selected repo?) and the selected repo is not loaded yet.
This loading process can be fast with a few repos as in the following pic, but for large workspaces it can be quite slow.

image

Also happens a lot when the extension editor is open when you close vscode and then later restore the workspace along with all the editors (this is when it always occurs to me, and quite often)

vscode error bubbles

image

console log
  • Stiched together as idk of a better method to share it, feel free to suggest other way or request more info.
  • Some lines might not be related to the extension, I capture where related messages started till the end:

2024-04-17_(092202)

Dunno if related to #82, but keep happening to me as of the last version. ATM I use the hotkey to open the view, but would be nice to have button to open+switch to different repos.

Feature request

Probably these error messages are useful for unexpected errors during usage, but there could be a way to silent them when clearly the issue is that the source control repos are not loaded yet. Or maybe directly avoid doing the queries when so.

Basically Ive never seen them pop up other than in the explained situations.

Best regards!

@phil294
Copy link
Owner

phil294 commented Apr 17, 2024

I've never had these errors come up, but I guess it should be rather easy to reproduce, particularly given how much information you provided. And personally I'm a fan of big aggressive ugly error message popups as they are more likely to be reported than silent console.logs - as long as they're fixed rapidly

@dimateos
Copy link
Contributor Author

dimateos commented Nov 28, 2024

It seems that the error bubbles no longer appear. But the errors when attempting to load a graph view of a repo yet to be detected by vscode git remains:

  • Close a worskpace with the graph open and active. Then, when you repoen the same worskpace and all tabs etc are restored, the graph is empty as the vscode source control engine has not parsed the repos yet.
vscode console errors

image
image

*** I actually also got errors bubbles too

image

*** Mentioning #71, as this error is quite similar as the ones that pop when the repositories are not loaded yet


A simple solution I suggest:

  • Make the tab with the graph do not persist when closing the workspace (this is what mhutchie.git-graph extension does)
  • For the graph in a view option, not so simple? probably some suggestions from the original post to silence the errors.
    • Could also try to reload after X seconds when the loading issue happens

Anyway this issue is not a deal breaker, just letting you know it still happens.

@phil294
Copy link
Owner

phil294 commented Nov 29, 2024

Yes, since the repos come in one after another, the saved-as-selected one might not be present, resulting in a non-resolvable conflict between index and actual repo path. This means that you'll see one repo selected above but the data below for another one. Fixing this requires substantial changes to the repo management. I believe the Git extension (which GitLG currently depends on) doesn't emit an "all repos have been loaded" event unfortunately, either. I'll have a look soon I can't really estimate this yet.

@dimateos
Copy link
Contributor Author

dimateos commented Dec 2, 2024

Make the tab with the graph do not persist when closing the workspace (this is what mhutchie.git-graph extension does)

Maybe this workaround is simple to add and good enough for the time being

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

No branches or pull requests

2 participants