Skip to content

dist: split DistExecutor's remote compile into prepare, dispatch and finish - #3

Merged
tiny-ac merged 2 commits into
reapi/mvpfrom
remote-executor/dist-steps
Oct 21, 2026
Merged

tiny-ac merged 2 commits into
reapi/mvpfrom
remote-executor/dist-steps

Conversation

@tiny-ac

@tiny-ac tiny-ac commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Description:

Splits DistExecutor's remote compile into three steps, so a later PR can run the middle one in the sccache daemon while the client-side CLI runs the other two. That is what makes sccache-dist work
in client-side mode.

  • prepare maps the compile's outputs to paths on the build server and builds its packagers. It needs the Compilation.
  • dispatch runs the compile on the cluster and writes its outputs to their local paths. It needs only plain data and the packagers.
  • finish passes the outputs to the OutputsRewriter and names the server in stderr if the remote compiler exited non-zero.

No behavior change: run_on_cluster calls the three steps in the order the code ran before, with the same logs, errors and output cleanup.

Changes

  • src/compiler/remote/dist.rs: run_on_cluster split into prepare, dispatch and finish, with the DistRequest and DistResponse types they pass along.
  • src/compiler/compiler.rs, src/compiler/remote/mod.rs: fixes from the RemoteExecutor trait PR's review. get_cached_or_compile asks the executor for its dist input options once and passes
    them to remote_or_local_compile. DistJob drops local_compiler: DistExecutor reads the compiler path from the local compile, and calls it compiler_path throughout.

Cost

One more String per distributed compile (out_pretty in DistRequest).

Validation

  • fmt, and clippy with -D warnings.
  • cargo test --lib --bins --tests: the dist tests in src/compiler/compiler.rs run all three steps, and the dist error test covers dispatch failing at each cluster call.
  • cargo check --no-default-features --features dist-client.

@tiny-ac
tiny-ac merged commit 67b0e06 into reapi/mvp Oct 21, 2026
64 of 96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant