microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.7k stars 769 forks source link

Virtual workspace has duplicates for show call hierarchy #5811

Open rchiodo opened 4 months ago

rchiodo commented 4 months ago

Make sure you have a fork of pylance-release in github (not cloned locally)

  1. Create a virtual environment
  2. Start VS code from a command prompt where this virtual environment is active
  3. Make sure enableSyncServer is set
  4. Run Open Remote Repository
  5. Pick Open repository from Github
  6. Type in your alias/pylance-release
  7. Open the repository
    • This will just open the root of pylance
  8. To get it to behave like a workspace, then do an Open Folder from the file menu and pick your alias/pylance-release/testing/single
  9. Open the showCallHierarchy.py file and do a show call hierarchy for sqrt

Expected result:

Same as without virtual workspaces

Actual result:

callByName seems to be in the output twice: image

Might be a dupe of https://github.com/microsoft/pylance-release/issues/5809

rchiodo commented 1 month ago

Now this seems to show nothing for virtual workspaces

heejaechang commented 1 month ago

when I debugged last time, it was due to same file added with 2 different uri (schema), so we ends up adding 2 entry for logically same file.