-
Notifications
You must be signed in to change notification settings - Fork 133
Wire up events from RDT to module resolution #703
Conversation
src/Analysis/Core/Impl/DependencyResolution/PathResolverSnapshot.cs
Outdated
Show resolved
Hide resolved
_disposableBag.ThrowIfDisposed(); | ||
// TODO: handle? | ||
switch (c.type) { | ||
case FileChangeType.Deleted: |
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.
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.
Frankly, I haven't seen it hit. I don't know when VSC sends it, this is why we have manual library watcher. But it doesn't hurt to handle.
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.
We could start watching workspace manually too, but that's a different issue.
@@ -65,12 +66,14 @@ private class DocumentEntry { | |||
lock (_lock) { | |||
entry = FindDocument(null, uri); | |||
if (entry == null) { | |||
var resolver = _services.GetService<IPythonInterpreter>()?.ModuleResolution?.CurrentPathResolver; |
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.
What is the case when _services.GetService<IPythonInterpreter>()
or ModuleResolution
is null?
* Fix microsoft#668 (partial) * Tests * Revert "Tests" This reverts commit 7ffc9db. * Basic event wire up * Add test * Test * Formatting * Fix search paths mess * Handle deleted files better * PR feedback * MErge issues * Fix race condition at builtins load * PR feedback
Fixes #700