Skip to content

[Custom Descriptors] Fix GTO descriptor optimization#7897

Merged
tlively merged 1 commit intomainfrom
gto-placholder-fix
Sep 11, 2025
Merged

[Custom Descriptors] Fix GTO descriptor optimization#7897
tlively merged 1 commit intomainfrom
gto-placholder-fix

Conversation

@tlively
Copy link
Copy Markdown
Member

@tlively tlively commented Sep 11, 2025

We were being too aggressive about removing unused descriptors. In
particular, we were removing descriptors from subtypes of public types
that themselves had descriptors, which caused invalid subtyping when
rebuilding the types. Fix the problem by only removing descriptors from
a type when we know we can remove the descriptor (if any) from its
supertype (if any) as well.

We were being too aggressive about removing unused descriptors. In
particular, we were removing descriptors from subtypes of public types
that themselves had descriptors, which caused invalid subtyping when
rebuilding the types. Fix the problem by only removing descriptors from
a type when we know we can remove the descriptor (if any) from its
supertype (if any) as well.
@tlively tlively requested a review from kripken September 11, 2025 20:11
Copy link
Copy Markdown
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Do you think this will be limiting in practice?

@tlively
Copy link
Copy Markdown
Member Author

tlively commented Sep 11, 2025

Not as long as users continue using --closed-world and minimizing the number of public types they expose.

@tlively tlively merged commit 9704e14 into main Sep 11, 2025
16 checks passed
@tlively tlively deleted the gto-placholder-fix branch September 11, 2025 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants