Skip to content

Decode RegistrationOptions #980

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

Merged
merged 14 commits into from
Nov 30, 2023
Merged

Decode RegistrationOptions #980

merged 14 commits into from
Nov 30, 2023

Conversation

krzyzanowskim
Copy link
Contributor

Decode RegistrationOptions from LSPAny

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

What’s the use case for decoding RegistrationOptions from LSPAny?

@krzyzanowskim
Copy link
Contributor Author

symmetric to encodeIntoLSPAny. If the server talk to the client, the client may want to decode options sent from the server. I work on a LSP client that uses LanguageServerProtocol as a dependency for model and decode the value on the client side.

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Ideally, we should make these types conform to LSPAnyCodable.

@krzyzanowskim
Copy link
Contributor Author

Ideally, we should make these types conform to LSPAnyCodable.

You're not wrong. It's so much more work. I'll try

@ahoppen
Copy link
Member

ahoppen commented Nov 27, 2023

Thank you 🙏🏽 I hope it’s not too much more

@krzyzanowskim
Copy link
Contributor Author

The LSPAnyCodable is here d718f46

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thank you for making the types conform to LSPAnyCodable 🙏🏽 Much cleaner.

I have some comments regarding consistency of de/encoding.

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thank you! I have one minor comment left, otherwise LGTM.

@ahoppen
Copy link
Member

ahoppen commented Nov 28, 2023

@swift-ci Please test

@ahoppen ahoppen enabled auto-merge (squash) November 28, 2023 22:47
@ahoppen
Copy link
Member

ahoppen commented Nov 28, 2023

@swift-ci Please test Windows

@krzyzanowskim
Copy link
Contributor Author

@swift-ci Please test macOS

@krzyzanowskim
Copy link
Contributor Author

I don’t think I have the power to re-run macOS test. It failed without a reason @ahoppen

@ahoppen
Copy link
Member

ahoppen commented Nov 29, 2023

Ah, macOS CI failed because the code isn’t formatted correctly. Could you run swift-format on it?

Sorry, we don’t have any documentation for that at the moment, I usually build swift-format locally and then run

cd /path/to/sourcekit-lsp
/path/to/swift-format/.build/arm64-apple-macosx/release/swift-format format -i --recursive Sources/ Tests/ Package.swift

auto-merge was automatically disabled November 29, 2023 22:07

Head branch was pushed to by a user without write access

@ahoppen
Copy link
Member

ahoppen commented Nov 29, 2023

@swift-ci Please test

@ahoppen ahoppen enabled auto-merge (squash) November 29, 2023 22:52
@ahoppen
Copy link
Member

ahoppen commented Nov 29, 2023

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Member

ahoppen commented Nov 30, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit b7cc49b into swiftlang:main Nov 30, 2023
@krzyzanowskim krzyzanowskim deleted the marcin/registration-options branch December 13, 2023 22:54
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