enso/lib/scala
Hubert Plociniczak dd06c59380
Initialize Language Server's JSON RPC protocol asynchronously (#7232)
As discovered in #7224, Json RPC protocol was added to the asynchronous resource initialization stage, as part of #6306, but was not in fact initialized at that point.
Instead it was initialized when the server was started to be able to serve correctly the initialization messages. A classic Catch-22. It was really hard to discover this just by looking at the code, but the profiling clearly showed where the time was spent.

This change splits Language Server's protocol into two:
- the first one accepts `heartbeat/init` and `session/initProtocolConnection`
- the second one enriches it with the full set of supported messages

This shifts the initialization from blocking for 0.5 sec to only ~30ms, and performing the second stage asynchronously.

Closes #7224.

# Important Notes
Before the change (blocking server startup):
![Screenshot from 2023-07-05 18-53-24](https://github.com/enso-org/enso/assets/292128/bcfa9043-d00a-4b36-a44c-782a388a16b9)
![Screenshot from 2023-07-05 18-53-10](https://github.com/enso-org/enso/assets/292128/54927787-4c95-46db-bd68-f3a3b82367d5)

After the change (1st stage):
![Screenshot from 2023-07-06 14-02-34](https://github.com/enso-org/enso/assets/292128/d7a7bc34-39dc-46f1-9e64-6d350697c30b)

After the change (2nd, asynchronous initialization, stage):
![Screenshot from 2023-07-06 14-21-17](https://github.com/enso-org/enso/assets/292128/def8c0a1-f211-4fc0-9df0-7c1634312166)
2023-07-07 11:49:23 +00:00
..
akka-native/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
cli/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
common-polyglot-core-utils/src/main/java/org/enso/polyglot/common_utils First part of AWS S3 API, various small fixes. (#6973) 2023-06-15 16:20:13 +00:00
connected-lock-manager/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
distribution-manager/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
downloader/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
edition-updater/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
edition-uploader/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
editions/src Scala 2.13.11 and libraries update (#7010) 2023-06-14 13:15:57 +00:00
interpreter-dsl/src/main/java/org/enso/interpreter/dsl Add method call info for infix operators (#7090) 2023-06-27 13:11:12 +00:00
json-rpc-server Initialize Language Server's JSON RPC protocol asynchronously (#7232) 2023-07-07 11:49:23 +00:00
json-rpc-server-test Initialize Language Server's JSON RPC protocol asynchronously (#7232) 2023-07-07 11:49:23 +00:00
library-manager/src Reload project's config on rename (#7179) 2023-07-03 09:36:19 +00:00
library-manager-test/src Optimize import/export resolution (#5700) 2023-03-01 08:53:29 +00:00
locking-test-helper/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
logger enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
logging-service/src Scala 2.13.11 and libraries update (#7010) 2023-06-14 13:15:57 +00:00
logging-truffle-connector/src/main Scala 2.13.11 and libraries update (#7010) 2023-06-14 13:15:57 +00:00
logging-utils/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
pkg Add timeout retries for project-related operations (#7173) 2023-07-03 12:44:41 +00:00
profiling-utils/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
project-manager Initialize Language Server's JSON RPC protocol asynchronously (#7232) 2023-07-07 11:49:23 +00:00
runtime-version-manager/src Reload project's config on rename (#7179) 2023-07-03 09:36:19 +00:00
runtime-version-manager-test/src Don't log installed engines and runtimes in prod (#5900) 2023-03-16 10:36:55 +00:00
searcher/src Do not return getters from global completion response (#7007) 2023-06-12 12:28:35 +00:00
syntax Moving construction of IR into runtime parser project (#7096) 2023-06-24 06:34:21 +02:00
task-progress-notifications/src/main/scala/org/enso/cli/task/notifications Scala 2.13.11 and libraries update (#7010) 2023-06-14 13:15:57 +00:00
testkit/src/main Mark some tests as (unconditonally) flaky (#6453) 2023-04-27 17:09:46 +02:00
text-buffer/src More elaborate error message for invalid text edit (#6108) 2023-03-28 14:21:50 +00:00
version-output/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00