This is an archive of the discontinued LLVM Phabricator instance.

[mlir-lsp] Add client information to the InitializationParams
ClosedPublic

Authored by rriddle on Jul 18 2023, 1:41 AM.

Details

Summary

This is specified in the spec, but we just never really needed it. This
allows for users of the LSP libraries to inspect information about the
client that is connected to the server.

Diff Detail

Event Timeline

rriddle created this revision.Jul 18 2023, 1:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 1:41 AM
rriddle requested review of this revision.Jul 18 2023, 1:41 AM
jpienaar accepted this revision.Jul 18 2023, 8:53 AM

Could we have an error case perhaps?

mlir/lib/Tools/lsp-server-support/Protocol.cpp
306

How is this materialized below? E.g., name is just a std::string, so that seems that it would report an error if not set.

This revision is now accepted and ready to land.Jul 18 2023, 8:53 AM
rriddle marked an inline comment as done.Jul 18 2023, 12:18 PM

Could we have an error case perhaps?

Yep, I'll add one. Thanks!

mlir/lib/Tools/lsp-server-support/Protocol.cpp
306

Oh, nice callout. Let me just make these fail.

This revision was automatically updated to reflect the committed changes.
rriddle marked an inline comment as done.