enso/docs/language-server
Dmitry Bushev 78993a0d1a
Run node in a different execution environment (#11173)
close #10719

Changelog:
- add: optional `expressionConfigs` parameter to the `executionContext/recompute` request
- update: `IdExecutionInstrument` allowing to run a single node in a specified execution environment
- refactor: move tests related to the recompute request to a separate test suite. Otherwise the `RuntimeServerTest` is becoming too bloated

# Important Notes
The updated `executionContext/recompute` request.

```typescript
interface ExecutionContextRecomputeParameters {
/** The execution context identifier. */
contextId: ContextId;

/** The expressions that will be invalidated before the execution.
*
*  Only the provided expression ids are invalidated excluding the dependencies.
*/
invalidatedExpressions?: "all" | ExpressionId[];

/** The execution environment that will be used in the execution. */
executionEnvironment?: ExecutionEnvironment;

/** The execution configurations for particular expressions.
*
*  The provided expressions will be invalidated from the cache with the
*  dependencies. The result of the execution will stay in the cache until the
*  cache is invalidated by editing the node or other means.
*/
expressionConfigs?: ExpressionConfig[];
}

interface ExpressionConfig {
/** The expression identifier. */
expressionId: ExpressionId;
/** The execution environment that should be used to run this expression. */
executionEnvironment?: ExecutionEnvironment;
}
```

#### Use cases

- to re-run a single node without re-running the dependent nodes (subtree), put the node id in the `invalidatedExpressions` parameter.
- to re-run a node with dependent nodes (subtree), put the node id in the `expressionConfigs` parameter with empty `executionEnvironment`
- to re-run a node in a different execution environment, put the node  id in the `expressionConfigs` and specify the `executionEnvieronment`
2024-10-09 12:09:45 +00:00
..
language-server-http-endpoints.md Add support for https and wss (#7937) 2023-10-12 00:03:34 +02:00
project-manager-http-endpoints.md Add projectsDirectory parameter to project endpoint (#10481) 2024-07-11 10:18:43 +00:00
protocol-architecture.md Add support for https and wss (#7937) 2023-10-12 00:03:34 +02:00
protocol-common.md Add JSON-RPC Timeout Error (#1332) 2020-12-09 15:53:00 +03:00
protocol-language-server.md Run node in a different execution environment (#11173) 2024-10-09 12:09:45 +00:00
protocol-project-manager.md Allow project manager to read files (#11204) 2024-10-01 16:52:29 +00:00
README.md Add Idleness Http Endpoint (#1847) 2021-07-12 16:53:44 +03:00
streaming-file-transfer.md Implement byte-based file operations (#1795) 2021-06-11 14:48:28 +01:00

layout title category tags order
section-summary Language Server language-server
language-server
readme
0

Language Server

The Enso Language Server is responsible for providing language services to the Enso IDE (and other clients). This mainly involves speaking the Enso protocol and orchestrating the runtime in response to this. It is responsible for:

  • Introspection Services: Giving clients the ability to observe information about their running code including values, types, profiling information, and debugging.
  • Code Execution: The ability for clients to execute arbitrary Enso code in arbitrary scopes. This can be used in conjunction with the above to provide a REPL with an integrated debugger.
  • Code Completion: Sophisticated completion functionality that refines suggestions intelligently based on context.
  • Node Management: Tracking and providing the language server's internal node representation of the Enso program.
  • Code Analysis: Analysis functionality for Enso code (e.g. find usages, jump-to-definition, and so on).
  • Refactoring: Refactoring functionality for Enso code (e.g. rename, move, extract, and so on).
  • Type Interactions: Features for type-driven-development that allow users to interact with the types of their programs.

This folder contains all documentation pertaining to the Language Server, which is broken up as follows:

The protocol messages are broken up into documents as follows: