[analysis_server] Fix LSP capabilities status page

The registration type has been changed from a Map to a Set, which can't
be encoded as JSON.
This broke the `/lsp_capabilities` diagnostics page.
Calling `.toList()` fixes the page by showing current registrations as
an array.

Change-Id: Ib20f422d55d29c4f10b52a09d0a9229a486b67b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216186
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Simon Binder 2021-10-11 16:23:43 +00:00 committed by commit-bot@chromium.org
parent 2dcc064916
commit 5f95f4d3bb

View file

@ -994,7 +994,7 @@ class LspCapabilitiesPage extends DiagnosticPageWithNav {
h3('Current registrations');
p('Showing the LSP method name and the registration params sent to the '
'client.');
prettyJson(server.capabilitiesComputer.currentRegistrations);
prettyJson(server.capabilitiesComputer.currentRegistrations.toList());
}
}