Skip to content

Migrate type hierarchy to use Rubydex#4072

Open
vinistock wants to merge 1 commit intorubydex_adoption_feature_branchfrom
vs_migrate_type_hierarchy
Open

Migrate type hierarchy to use Rubydex#4072
vinistock wants to merge 1 commit intorubydex_adoption_feature_branchfrom
vs_migrate_type_hierarchy

Conversation

@vinistock
Copy link
Copy Markdown
Member

Motivation

This PR migrates type hierarchy to use Rubydex.

Implementation

I moved all constant resolution to the prepare type hierarchy request, which pays the price once for resolving and then forwards the fully qualified name to super/sub types through the flexible data attribute. I also ensured that users can request singleton hierarchy.

The super types request is considerably simpler because the fully qualified name is always received through the data attribute.

The rest of the implementation ensures that we are handling singleton classes correctly because of their implicit nature. For example:

class Foo
  class << self
  end
end

The Foo::<Foo> declaration inherits from Object::<Object>, which exists in the graph, but there's no definition to back it up (it's implicit). In those cases, we need to find the definition of the original attached object, so that we can show something useful to the user.

Automated Tests

I added a bunch more tests verifying that we behave correctly under a variety of conditions.

@vinistock vinistock requested review from alexcrocha and st0012 April 21, 2026 19:59
@vinistock vinistock self-assigned this Apr 21, 2026
@vinistock vinistock requested a review from a team as a code owner April 21, 2026 19:59
@vinistock vinistock added server This pull request should be included in the server gem's release notes other Changes that aren't bugfixes, enhancements or breaking changes labels Apr 21, 2026
@vinistock vinistock mentioned this pull request Apr 21, 2026
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

other Changes that aren't bugfixes, enhancements or breaking changes server This pull request should be included in the server gem's release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant