Skip to content

[ty] Compact use-def maps for simple scopes - #28354

Closed
charliermarsh wants to merge 2 commits into
mainfrom
charlie/codex-ty-compact-simple-use-def-maps
Closed

charliermarsh wants to merge 2 commits into
mainfrom
charlie/codex-ty-compact-simple-use-def-maps

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Scopes with a single unused, unconditional definition per symbol retain full binding and declaration tables, as in many stub function bodies. We now keep the existing definitions and one declaration flag per symbol, reconstructing the binding and declaration iterators when needed.

We now select the compact representation only after validating every retained field. The iterators preserve definition order, implicit unbound and undeclared entries, constraints, and boundness analysis.

@charliermarsh charliermarsh added the ty The ty type checker label Sep 6, 2026
@astral-sh-bot

astral-sh-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 97.84%. The percentage of expected errors that received a diagnostic held steady at 96.45%. The number of fully passing files held steady at 128/145.

@astral-sh-bot

astral-sh-bot Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

Memory usage report

Summary

Project Old New Diff Outcome
flake8 39.00MB 38.35MB -1.66% (661.39kB) ⬇️
trio 94.53MB 93.55MB -1.04% (1008.86kB) ⬇️
sphinx 169.08MB 167.96MB -0.66% (1.12MB) ⬇️
prefect 471.26MB 470.02MB -0.26% (1.25MB) ⬇️

Significant changes

Click to expand detailed breakdown

flake8

Name Old New Diff Outcome
semantic_index 9.96MB 9.31MB -6.49% (661.39kB) ⬇️

trio

Name Old New Diff Outcome
semantic_index 20.08MB 19.10MB -4.91% (1008.86kB) ⬇️

sphinx

Name Old New Diff Outcome
semantic_index 34.09MB 32.98MB -3.28% (1.12MB) ⬇️

prefect

Name Old New Diff Outcome
semantic_index 90.61MB 89.36MB -1.37% (1.25MB) ⬇️

@astral-sh-bot

astral-sh-bot Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@charliermarsh
charliermarsh marked this pull request as ready for review September 6, 2026 12:30
@charliermarsh
charliermarsh requested a review from a team as a code owner September 6, 2026 12:30
@astral-sh-bot
astral-sh-bot Bot requested a review from ibraheemdev September 6, 2026 12:30
@charliermarsh
charliermarsh marked this pull request as draft September 6, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty The ty type checker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant