Skip to content

Commit

Permalink
Replace Distributed with Malt
Browse files Browse the repository at this point in the history
- Remove `workspace_use_distributed` flag. Pluto will now always use
  separate processes.
- Replace calls to `remotecall_eval` with the appropiate Malt calls.
- Replace Distributed with Malt in tests to remove it from dependencies.
  - Add `unmake_workspace` calls in `MacroAnalysis` to prevent creating
    too many processes at the same time.
- Replace Distributed exceptions with Malt exceptions.
- Replace `pid::Integer` with `worker::Worker` in WorkspaceManager.
- Rename `workspaces` to `active_workspaces`.
- Rename `distributed_exception_result` to `workspace_exception_result`.
- Rename `make_distributed_serializable` to `make_serializable`.
  • Loading branch information
savq committed Sep 23, 2022
1 parent b61bf9a commit 344ac94
Show file tree
Hide file tree
Showing 23 changed files with 196 additions and 273 deletions.
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ version = "0.19.12"
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Configurations = "5218b696-f38b-4ac9-8b61-a12ec717816d"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
FileWatching = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
FuzzyCompletions = "fb4132e2-a121-4a70-b8a1-d5b831dcdcc2"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
HypertextLiteral = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MIMEs = "6c6e2e6c-3030-632d-7369-2d6c69616d65"
Malt = "36869731-bdee-424d-aa32-cab38c994e3b"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
MsgPack = "99f44e22-a591-53d1-9472-aa23ef4bd671"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PrecompileSignatures = "91cefc8d-f054-46dc-8f8c-26e11d7c5411"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
Expand All @@ -43,12 +44,12 @@ julia = "^1.6"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Memoize = "c03570c3-d221-55d1-a50c-7939bbd78826"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
Memoize = "c03570c3-d221-55d1-a50c-7939bbd78826"

[targets]
test = ["DataFrames", "OffsetArrays", "Random", "Sockets", "Test", "TimerOutputs", "Memoize"]
5 changes: 0 additions & 5 deletions src/Configuration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ Note that Pluto is quickly evolving software, maintained by designers, educators
end

const RUN_NOTEBOOK_ON_LOAD_DEFAULT = true
const WORKSPACE_USE_DISTRIBUTED_DEFAULT = true
const LAZY_WORKSPACE_CREATION_DEFAULT = false
const CAPTURE_STDOUT_DEFAULT = true

Expand All @@ -138,13 +137,11 @@ const CAPTURE_STDOUT_DEFAULT = true
Options to change Pluto's evaluation behaviour during internal testing. 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.
- `lazy_workspace_creation::Bool = $LAZY_WORKSPACE_CREATION_DEFAULT`
- `capture_stdout::Bool = $CAPTURE_STDOUT_DEFAULT`
"""
@option mutable struct EvaluationOptions
run_notebook_on_load::Bool = RUN_NOTEBOOK_ON_LOAD_DEFAULT
workspace_use_distributed::Bool = WORKSPACE_USE_DISTRIBUTED_DEFAULT
lazy_workspace_creation::Bool = LAZY_WORKSPACE_CREATION_DEFAULT
capture_stdout::Bool = CAPTURE_STDOUT_DEFAULT
end
Expand Down Expand Up @@ -250,7 +247,6 @@ function from_flat_kwargs(;
require_secret_for_open_links::Bool = REQUIRE_SECRET_FOR_OPEN_LINKS_DEFAULT,
require_secret_for_access::Bool = REQUIRE_SECRET_FOR_ACCESS_DEFAULT,
run_notebook_on_load::Bool = RUN_NOTEBOOK_ON_LOAD_DEFAULT,
workspace_use_distributed::Bool = WORKSPACE_USE_DISTRIBUTED_DEFAULT,
lazy_workspace_creation::Bool = LAZY_WORKSPACE_CREATION_DEFAULT,
capture_stdout::Bool = CAPTURE_STDOUT_DEFAULT,
compile::Union{Nothing,String} = COMPILE_DEFAULT,
Expand Down Expand Up @@ -289,7 +285,6 @@ function from_flat_kwargs(;
)
evaluation = EvaluationOptions(;
run_notebook_on_load,
workspace_use_distributed,
lazy_workspace_creation,
capture_stdout,
)
Expand Down
Loading

0 comments on commit 344ac94

Please sign in to comment.