Open farmaazon opened 1 month ago
This will likely end up as a duplicate of #10730
Re-running a node in different "context" without modifying a source needs some changes in the language-server
protocol - up to @4e6 and Hubert. I can only imagine we get a request to re-run a method while:
The next part of work is in IdExecutionInstrument:
Changing the state may require
e.g. to store State
as "thread local variable" - but that's something we should do anyway.
I propose to update the executionContext/recompute
request with the new optional expressionConfigs
parameter that tells to execute provided expressions in a specific execution environment
interface ExecutionContextRecomputeParameters {
/** The execution context identifier. */
contextId: ContextId;
/** The expressions that will be invalidated before the execution. */
invalidatedExpressions?: "all" | ExpressionId[];
/** The execution environment that will be used in the execution. */
executionEnvironment?: ExecutionEnvironment;
/** The configuration of how to execute each expression. */
expressionConfigs?: ExpressionConfig[];
}
interface ExpressionConfig {
/** The expression identifier. */
expressionId: UUID;
/** Run the expression in a specified execution environment. */
executionEnvironment?: ExecutionEnvironment;
}
Updating recompute
is good approach.
Alternative:
invalidatedExpressions?: "all" | ExpressionId[] | ExpressionConfig[]
Maybe you want to use ExpressionId
even in expressionId:
definition and not UUID
?
To implement #10486, we need to have a way of re-running a single node. With possibility of enabling output context on this node (like it would have
Standard.Base.Runtime.with_enabled_context Standard.Base.Runtime.Context.Output "design" <|
attached to the expression).