mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 19:21:54 +03:00
13969abc92
The change eliminates a race-condition that can appear between the `PathWatcher` deregistering the last client (and shutting down) and `ReceivesTreeUpdatesHandler` receiving the termination message of that event. In between there could come a message towards the mentioned `PathWatcher` resulting in a timeout. The scenario has become rather common in CI tests resulting in spurious failures. The problem could also be simulated by adding artificial `Thread.sleep` between sending the reply in `PathWatcher` and stopping the actor. Fixes #8151. # Important Notes Example failure https://github.com/enso-org/enso/actions/runs/6642894609/job/18048711561?pr=8145 To simulate the scenario ```diff diff --git a/engine/language-server/src/main/scala/org/enso/languageserver/filemanager/PathWatcher.scala b/engine/language-server/src/main/scala/org/enso/languageserver/filemanager/PathWatcher.scala index 713cfe1182..88afac95cb 100644 --- a/engine/language-server/src/main/scala/org/enso/languageserver/filemanager/PathWatcher.scala +++ b/engine/language-server/src/main/scala/org/enso/languageserver/filemanager/PathWatcher.scala @@ -110,6 +110,7 @@ final class PathWatcher( case UnwatchPath(client) => sender() ! CapabilityReleased + Thread.sleep(2000) unregisterClient(root, base, clients - client) ``` |
||
---|---|---|
.. | ||
interpreter-dsl-test/src/test/java/org/enso/interpreter/dsl/test | ||
language-server | ||
launcher/src | ||
polyglot-api/src | ||
runner | ||
runtime | ||
runtime-instrument-common/src | ||
runtime-instrument-id-execution/src/main/java/org/enso/interpreter/instrument | ||
runtime-instrument-repl-debugger/src/main/java/org/enso/interpreter/instrument | ||
runtime-instrument-runtime-server/src/main/java/org/enso/interpreter/instrument | ||
runtime-language-epb/src/main/java/org/enso/interpreter/epb | ||
runtime-parser/src | ||
runtime-with-instruments/src/test | ||
runtime-with-polyglot/src/test | ||
README.md |
The Enso Engine
The Enso engine is the codebase responsible for compiling and executing Enso code, as well as providing language server functionality to users of the language. It is subdivided into two major components:
- Language Server: The Enso language service.
- Polyglot API: The truffle-boundary safe API for communication between the language server and the runtime.
- Runner: The command-line interface for Enso.
- Runtime: The compiler and interpreter for Enso.