diff --git a/src/Configuration.jl b/src/Configuration.jl index 403a060d84..2b7eed6ae9 100644 --- a/src/Configuration.jl +++ b/src/Configuration.jl @@ -140,7 +140,7 @@ end const RUN_NOTEBOOK_ON_LOAD_DEFAULT = true const WORKSPACE_USE_DISTRIBUTED_DEFAULT = true -const WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT = false +const WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT = nothing const LAZY_WORKSPACE_CREATION_DEFAULT = false const CAPTURE_STDOUT_DEFAULT = true const WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT = nothing @@ -153,7 +153,7 @@ These options are not intended to be changed during normal use. - `run_notebook_on_load::Bool = $RUN_NOTEBOOK_ON_LOAD_DEFAULT` Whether to evaluate a notebook on load. - `workspace_use_distributed::Bool = $WORKSPACE_USE_DISTRIBUTED_DEFAULT` Whether to start notebooks in a separate process. -- `workspace_use_distributed_stdlib::Bool = $WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT` Should we use the Distributed stdlib to run processes? This has been replaced by Malt.jl, but you can use this option to get the old behaviour. Option be removed in the future. +- `workspace_use_distributed_stdlib::Bool? = $WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT` Should we use the Distributed stdlib to run processes? Distributed will be replaced by Malt.jl, you can use this option to already get the old behaviour. `nothing` means: determine automatically (which is currently the same as `true`). - `lazy_workspace_creation::Bool = $LAZY_WORKSPACE_CREATION_DEFAULT` - `capture_stdout::Bool = $CAPTURE_STDOUT_DEFAULT` - `workspace_custom_startup_expr::Union{Nothing,Expr} = $WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT` An expression to be evaluated in the workspace process before running notebook code. @@ -161,7 +161,7 @@ These options are not intended to be changed during normal use. @option mutable struct EvaluationOptions run_notebook_on_load::Bool = RUN_NOTEBOOK_ON_LOAD_DEFAULT workspace_use_distributed::Bool = WORKSPACE_USE_DISTRIBUTED_DEFAULT - workspace_use_distributed_stdlib::Bool = WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT + workspace_use_distributed_stdlib::Union{Bool,Nothing} = WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT lazy_workspace_creation::Bool = LAZY_WORKSPACE_CREATION_DEFAULT capture_stdout::Bool = CAPTURE_STDOUT_DEFAULT workspace_custom_startup_expr::Union{Nothing,Expr} = WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT @@ -295,7 +295,7 @@ function from_flat_kwargs(; run_notebook_on_load::Bool = RUN_NOTEBOOK_ON_LOAD_DEFAULT, workspace_use_distributed::Bool = WORKSPACE_USE_DISTRIBUTED_DEFAULT, - workspace_use_distributed_stdlib::Bool = WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT, + workspace_use_distributed_stdlib::Union{Bool,Nothing} = WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT, lazy_workspace_creation::Bool = LAZY_WORKSPACE_CREATION_DEFAULT, capture_stdout::Bool = CAPTURE_STDOUT_DEFAULT, workspace_custom_startup_expr::Union{Nothing,Expr} = WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT, diff --git a/src/evaluation/WorkspaceManager.jl b/src/evaluation/WorkspaceManager.jl index 3a8dcfe208..0d952a7d55 100644 --- a/src/evaluation/WorkspaceManager.jl +++ b/src/evaluation/WorkspaceManager.jl @@ -53,7 +53,11 @@ function make_workspace((session, notebook)::SN; is_offline_renderer::Bool=false WorkerType = if is_offline_renderer || !session.options.evaluation.workspace_use_distributed Malt.InProcessWorker - elseif session.options.evaluation.workspace_use_distributed_stdlib + elseif something( + session.options.evaluation.workspace_use_distributed_stdlib, + true + # VERSION < v"1.8.0-0" + ) Malt.DistributedStdlibWorker else Malt.Worker