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

Explicitly implement protocol in completion modules #386

Merged
merged 1 commit into from
Sep 22, 2023
Merged

Explicitly implement protocol in completion modules #386

merged 1 commit into from
Sep 22, 2023

Conversation

zachallaun
Copy link
Collaborator

Looking at the commit that introduced the Impl helper (4d1269e), its inclusion is understandable. It replaced a previously existing Translator that was doing more heavy lifting, but it's now such a thin layer of abstraction that it does not seem worth hiding the intent, which is implementing Lexical.Completion.Translatable.

This commit also removes the __deriving__/3 implementation in for the Translatable protocol because it was only used by the now-deleted Impl and I don't believe it would likely be used by external implementors of the protocol.

Looking at the commit that introduced the `Impl` helper (4d1269e), its
inclusion is understandable. It replaced a previously existing
`Translator` that was doing more heavy lifting, but it's now such a thin
layer of abstraction that it does not seem worth hiding the intent,
which is implementing `Lexical.Completion.Translatable`.

This commit also removes the `__deriving__/3` implementation in for the
`Translatable` protocol because it was only used by the now-deleted
`Impl` and I don't believe it would likely be used by external
implementors of the protocol.
Copy link
Collaborator

@scohen scohen left a comment

Choose a reason for hiding this comment

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

Agreed, it isn't saving much work any more.

.github/workflows/elixir.yml Outdated Show resolved Hide resolved
.github/workflows/elixir.yml Outdated Show resolved Hide resolved
@zachallaun
Copy link
Collaborator Author

Whoops. Removed unrelated commit. Will merge once checks pass.

@zachallaun zachallaun merged commit 347650c into lexical-lsp:main Sep 22, 2023
@zachallaun zachallaun deleted the za-translatable-proto-refactor branch September 22, 2023 17:04
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