microbit-foundation / python-editor-v3

Micro:bit Educational Foundation Python Editor V3
https://python.microbit.org
MIT License
57 stars 36 forks source link

Fix RangeError due to stale signature help tooltips #1054

Closed microbit-matt-hillsdon closed 1 year ago

microbit-matt-hillsdon commented 1 year ago

It now maps the position through so you see lagged tooltips if Pyright responses are slow rather than tooltips for positions that might not be in the document at all.

github-actions[bot] commented 1 year ago

Preview build will be at https://review-python-editor-v3.microbit.org/async-safe-sighelp/

microbit-robert commented 1 year ago

The slightly buggy behaviour of having signature help on an existing function open, and then dragging over a new API snippet I mentioned previously causes errors on this branch.

microbit-matt-hillsdon commented 1 year ago

The slightly buggy behaviour of having signature help on an existing function open, and then dragging over a new API snippet I mentioned previously causes errors on this branch.

Thanks, I can reproduce them.

microbit-matt-hillsdon commented 1 year ago

I think this is now working. @microbit-robert, please break it again!

I want this to work without the fix of closing signature help as I think dnd actually exercises this code really well. However, that's still a good plan so I've raised #1055 and have a fix on #1056 that I'll rebase after this is in.

microbit-matt-hillsdon commented 1 year ago

I'm re-running CI (it passed) to build a bit more confidence in the e2e tests here.

microbit-matt-hillsdon commented 1 year ago

Looking again at this as I managed to trigger an error with my original repro.

microbit-matt-hillsdon commented 1 year ago

Looking again at this as I managed to trigger an error with my original repro.

OK, I'm happy again 🤞

It's rebuilding now.