Skip to content

[ty] Fix server panic when calling system_mut#18252

Merged
MichaReiser merged 1 commit intomainfrom
micha/fix-arc-get-mut-panic
May 22, 2025
Merged

[ty] Fix server panic when calling system_mut#18252
MichaReiser merged 1 commit intomainfrom
micha/fix-arc-get-mut-panic

Conversation

@MichaReiser
Copy link
Member

Summary

Drop order matters... See inline comment

Fixes astral-sh/ty#469

Test Plan

I added a fake sleep of 5s to the diagnostics handler. I then typed a ton and wasn't able to reproduce the error where I was before the fix.

@MichaReiser MichaReiser added bug Something isn't working server Related to the LSP server ty Multi-file analysis & type inference labels May 22, 2025
@MichaReiser MichaReiser force-pushed the micha/fix-arc-get-mut-panic branch from 951ebe4 to 5d20be6 Compare May 22, 2025 11:58
@github-actions
Copy link
Contributor

github-actions bot commented May 22, 2025

mypy_primer results

No ecosystem changes detected ✅

@MichaReiser MichaReiser force-pushed the micha/fix-arc-get-mut-panic branch from 5d20be6 to 62f3b19 Compare May 22, 2025 13:08
Copy link
Contributor

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uff — thank you!

@MichaReiser MichaReiser merged commit 98da200 into main May 22, 2025
35 checks passed
@MichaReiser MichaReiser deleted the micha/fix-arc-get-mut-panic branch May 22, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working server Related to the LSP server ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server panic: "ref count should be 1 because zalsa_mut drops all other DB references"

2 participants