fix: show hover in notebook when kernal switches#3633
Conversation
This comment has been minimized.
This comment has been minimized.
kinto0
left a comment
There was a problem hiding this comment.
thanks!
is there any way to test this behavior with a lsp_interaction test that failed before your changes?
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
|
previously |
|
@kinto0 has imported this pull request. If you are a Meta employee, you can view this in D107533803. |
kinto0
left a comment
There was a problem hiding this comment.
thank you! clean fix with great test coverage
Summary
Cell content metdata was being updated when there are changes made to cells inside the notebook. LspEvent's didChange event runs the
notebook_document_did_changefn which earlier updated the cell metdata of notebook only when there are changes made to the cell and since kernel switching doesn't cause any cell changes, the existing cells didn't get inserted intonotebookDocumentstruct's cell field. this caused hover to stop working on the existing cells after kernel switching.Fixes #3598
Test Plan
test.ipynbfile, created new cell in it.x=5, and switched kernel and hovered overx