fixed Uri to use value check rather than reference check. #9665
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixed #9610
pyright/packages/pyright-internal/src/analyzer/parentDirectoryCache.ts
Line 59 in 0f57009
this code wrongly used reference check rather than value check for
uri
. when things were working, this code happens to get the sameUri
instance so it worked or hid the bug, but now, code changes changed it to get a different instance ofuri
withthe same value
causing it to fail.fixed the bug by using proper
equals
method instead of!==
...
this makes behavior to the same as before. but that said, what user did is a bit weird.
this basically makes whole
workspace
folder as3rd party library folder
. making it ambiguous topyright
whether it should think files under the workspace root as user files or 3rd party files.right now, behavior is what it is, but not sure whether that's by design or just behavior of what happens to be the current implementation does.