Skip to content

Conversation

@MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Apr 10, 2025

Summary

I added a key to Monaco which means that onMount can now run more than once (in fact, it runs once on first initialization and then once everytime the user hits reset).

This PR fixes the double (or triple!) hover and inlays by disposing the old server when onMount is executed again

Fixes #17329, #17330

@MichaReiser MichaReiser added playground A playground-specific issue ty Multi-file analysis & type inference labels Apr 10, 2025
@MichaReiser MichaReiser enabled auto-merge (squash) April 10, 2025 12:38
@MichaReiser MichaReiser merged commit 5b1d835 into main Apr 10, 2025
21 checks passed
@MichaReiser MichaReiser deleted the micha/fix-double-hovers branch April 10, 2025 12:40
dcreager added a commit that referenced this pull request Apr 10, 2025
* main: (30 commits)
  [red-knot] Silence `unresolved-import` in unreachable code (#17336)
  red_knot_python_semantic: move TODO comment
  red_knot_python_semantic: rename `lint()` and `report()`
  ruff_db: use `Annotation::get_message` in more places
  red_knot_python_semantic: tweak docs on building reporter builders
  red_knot_python_semantic: remove the "old" secondary message type
  red_knot_python_semantic: replace one use of "old" secondary diagnostic messages
  red_knot_python_semantic: update revealed type snapshots
  ruff_db: tweak how the revealed type diagnostic is rendered
  red_knot: add explicit test for concise `reveal_type` diagnostic
  red_knot_python_semantic: remove `InferContext::report_diagnostic`
  red_knot_python_semantic: add "reporter" API
  Bump 0.11.5 (#17337)
  [red-knot] Silence `unresolved-attribute` in unreachable code (#17305)
  Revert "[red-knot] Type narrowing for assertions (#17149)" (#17335)
  [red-knot] Type narrowing for assertions (#17149)
  [red-knot] avoid unnecessary evaluation of visibility constraint on definitely-unbound symbol (#17326)
  update cargo-dist (#17325)
  [red-knot] Fix double hovers/inlays in playground (#17334)
  [red-knot] Track reachability of scopes (#17332)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

playground A playground-specific issue ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[red-knot] Playground crashes sometimes when clicking reset

2 participants