microsoft / pylance-release

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

Find all references doesn't look in closed notebook files #5175

Open rchiodo opened 1 year ago

rchiodo commented 1 year ago

Repro steps:

  1. Git clone https://github.com/bokeh/tutorial
  2. Open a bunch of the notebooks. They all have this code at the top:
# activate notebook output
from bokeh.io import output_notebook

output_notebook()
  1. Find all references on output_notebook

Expected result: At least finding references in all of the open notebooks

Actual result: Finds the reference only in the current notebook

judej commented 1 year ago

need to check if this is a regression

rchiodo commented 1 year ago

This is not a regression and is really because we can't search on disk.

The root cause of the problem is that notebook tabs are open in VS code but they weren't clicked on to cause the notebook to render. The notebookDocument/open even was never sent.

So the root of the problem is that we can't search on disk.

rchiodo commented 3 months ago

See this issue for how we could solve this problem: https://github.com/microsoft/vscode/issues/177391