Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Definition extensible #989

Merged
merged 1 commit into from
Sep 8, 2023
Merged

Make Definition extensible #989

merged 1 commit into from
Sep 8, 2023

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Sep 8, 2023

Motivation

This is part of #808

Implementation

  1. Make Definition inherit ExtensibleListener
  2. Implement all the required interfaces + move super call of the constructor after other ivars are initialised
  3. Add Extension#create_definition_listener

Automated Tests

I added 1 test for the extension. But given Definition#merge_response! needs to handle a few more cases for combination of response types (nil | Location | Array of Location), we could use more tests cover them.

However, all the cases should already be checked by Sorbet and it'd be very lengthy to make tests populate different definition results while calling extensions. So I'm not sure if it'd be worth the effort.

Manual Tests

@st0012 st0012 added the enhancement New feature or request label Sep 8, 2023
@st0012 st0012 added this to the 2023-Q3 milestone Sep 8, 2023
@st0012 st0012 requested a review from a team as a code owner September 8, 2023 17:23
@st0012 st0012 self-assigned this Sep 8, 2023
Copy link
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

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

🚀

@st0012 st0012 merged commit 869698b into main Sep 8, 2023
@st0012 st0012 deleted the make-definition-extensible branch September 8, 2023 20:29
vinistock added a commit that referenced this pull request Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants