-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
chore: avoid workspace watcher crashing if folder is deleted #2359
Conversation
looks like a build error |
My bad, fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we are fixing the deprecated method instead of the new method?
Looks like there are 12 references to the deprecated method. Could we try to migrate those instances instead? Then, we can also clean up |
My bad, I was trying to fix the issue causing the overload of errors in sentry and tried to make the fix as quickly as possible. The deprecated function is fully removed now. |
This PR drops the total circular dependency count from 136 to 123. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
WorkspaceWatcher
was using the deprecatedWorkspaceService.isPathInWorkspace
to check if something is in workspace. This function doesthis.config
, which runsWorkspaceService.getOrCreateConfig
, which will attempt to read the config file, or write it if the config file is missing.If the folder that should contain the config file is missing, this will cause a
ENOENT
error.I think this can happen if the user loads up a Dendron workspace, but then deletes the folder that contains the workspace while VSCode is still running.