Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[ty] Remove redundant semantic index shrinks - #26392

#26392
Merged
MichaReiser merged 1 commit into
mainastral-sh/ruff:mainfrom
micha/remove-redundant-semantic-index-shrinksastral-sh/ruff:micha/remove-redundant-semantic-index-shrinksCopy head branch name to clipboard
Jun 26, 2026
Merged

[ty] Remove redundant semantic index shrinks#26392
MichaReiser merged 1 commit into
mainastral-sh/ruff:mainfrom
micha/remove-redundant-semantic-index-shrinksastral-sh/ruff:micha/remove-redundant-semantic-index-shrinksCopy head branch name to clipboard

Conversation

@MichaReiser

Copy link
Copy Markdown
Member

Summary

Remove redundant shrink_to_fit calls before converting semantic index arrays to FrozenIndexVec. The conversion already uses into_boxed_slice, which discards spare capacity.

Test Plan

Testing: Passed focused crate tests and repository hooks.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Jun 26, 2026

SemanticIndex {
place_tables: place_tables.into(),
scopes: self.scopes.into(),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

self.scopes -> calls into

@astral-sh-bot

astral-sh-bot Bot commented Jun 26, 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 94.47%. The percentage of expected errors that received a diagnostic held steady at 89.19%. The number of fully passing files held steady at 95/134.

@astral-sh-bot

astral-sh-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@MichaReiser
MichaReiser force-pushed the micha/remove-redundant-semantic-index-shrinks branch from cd7cd7a to 07164e4 Compare June 26, 2026 08:04
expressions_by_node: self.expressions_by_node,
unpacks_by_target: FrozenMap::from(self.unpacks_by_target),
statements_by_node: self.statements_by_node,
scope_ids_by_scope: self.scope_ids_by_scope.into(),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Same for scope_ids_by_scope

@MichaReiser
MichaReiser marked this pull request as ready for review June 26, 2026 08:05
@MichaReiser
MichaReiser requested a review from a team as a code owner June 26, 2026 08:05
@astral-sh-bot
astral-sh-bot Bot requested a review from charliermarsh June 26, 2026 08:05
@astral-sh-bot

astral-sh-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff (timing results)

@MichaReiser
MichaReiser merged commit c7e3dce into main Jun 26, 2026
63 checks passed
@MichaReiser
MichaReiser deleted the micha/remove-redundant-semantic-index-shrinks branch June 26, 2026 08:18
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.