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

Remove aliased shapes #1254

Merged
merged 1 commit into from
Dec 15, 2023
Merged

Remove aliased shapes #1254

merged 1 commit into from
Dec 15, 2023

Conversation

vinistock
Copy link
Member

Motivation

Removed our type aliases with shapes as they present considerable performance overhead.

@vinistock vinistock self-assigned this Dec 15, 2023
@vinistock vinistock requested a review from a team as a code owner December 15, 2023 15:55
@vinistock vinistock requested review from andyw8 and st0012 December 15, 2023 15:55

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@vinistock vinistock force-pushed the vs/remove_aliased_shapes branch from cb8d321 to 73f9f5a Compare December 15, 2023 18:08
@@ -80,7 +76,7 @@ def cache_get(request_name)
@cache[request_name]
end

sig { params(edits: T::Array[EditShape], version: Integer).void }
sig { params(edits: T::Array[T::Hash[Symbol, T.untyped]], version: Integer).void }
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we could create a real Edit class instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

We receive these parameters from the language-server_protocol gem as hashes, so that would be a much more involved refactor. We'd need to start instantiating specialized objects for each type of request.

To be honest, I think it's a worth while contribution for the gem since passing hashes around is not very type friendly. But it'll take considerably more effort than this

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I've been meaning to do this refactor for the gem, actually. Maybe I can get this done this week.

@vinistock vinistock merged commit 16b4c7e into main Dec 15, 2023
@vinistock vinistock deleted the vs/remove_aliased_shapes branch December 15, 2023 19:15
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.

None yet

4 participants