Skip to content

[ty] Fix notifications about watched changes for entities outside any workspace#24775

Open
EliteTK wants to merge 2 commits intomainfrom
tk/watching-nonlocal-environments
Open

[ty] Fix notifications about watched changes for entities outside any workspace#24775
EliteTK wants to merge 2 commits intomainfrom
tk/watching-nonlocal-environments

Conversation

@EliteTK
Copy link
Copy Markdown

@EliteTK EliteTK commented Apr 21, 2026

Summary

Distribute watched file change events generated by the LSP client to all dbs.

This simplifies the filtering logic to be handled by each db, and also fixes venvs which are outside the workspace (which can happen for symlinked environments).

Test Plan

Neovim, and a custom test harness (let me know if there is a way to test this in ty itself, Micha made it sound like it wasn't so easy.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Apr 21, 2026
@EliteTK EliteTK changed the title Tk/watching nonlocal environments Fix notifications about watched changes for entities outside any workspace Apr 21, 2026
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Apr 21, 2026

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 87.94%. The percentage of expected errors that received a diagnostic held steady at 83.36%. The number of fully passing files held steady at 79/133.

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Apr 21, 2026

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Apr 21, 2026

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@EliteTK EliteTK force-pushed the tk/watching-nonlocal-environments branch 2 times, most recently from 9c68be9 to 4f81e82 Compare April 21, 2026 19:10
EliteTK added 2 commits April 21, 2026 15:15
This is to avoid needing to clone a vec a million times but I almost
regret doing this :S
@EliteTK EliteTK force-pushed the tk/watching-nonlocal-environments branch from 4f81e82 to 41d0607 Compare April 21, 2026 19:15
Copy link
Copy Markdown
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Thank you!

This makes sense to me. I suspect that we now end up invalidating multiple dbs when any pyproject.toml changed but I don't think this is worth special casing (at least now).

@AlexWaygood AlexWaygood changed the title Fix notifications about watched changes for entities outside any workspace [ty] Fix notifications about watched changes for entities outside any workspace Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants