Code mods are the client's mods feature: tests and probes skip wasmtime

horizon-mods' runtime is no longer a default feature, and its sandbox test
requires runtime and pack instead of a dev-dependency on itself (that
dev-dependency turned the runtime on in every workspace build with examples,
the parity probe build included). The client gets a mods feature that turns
the runtime on; without it game/mods.rs keeps content mods and logs why code
mods don't start, and every hook does nothing.

Release builds (client and server) pass the feature, CI's clippy and tests
pass it (and pack, for the sandbox test), and pr_ready does where horizon-mods
is checked. horizon_mods::find moves to manifest.rs: content mods use it
without the runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-23 14:58:39 +02:00
parent 2439475716
commit b15e5e893e
14 changed files with 138 additions and 52 deletions
+12 -2
View File
@@ -274,6 +274,16 @@ def parity_summary(output):
return text
def mod_features(crates):
"""Code mods are off by default (docs/mods.md): on wherever horizon-mods is checked, as in CI."""
if crates is not None and "horizon-mods" not in crates:
return ""
features = ["horizon-mods/runtime", "horizon-mods/pack"]
if crates is None or "horizon-client" in crates:
features.append("horizon-client/mods")
return f" --features {','.join(features)}"
def plan(args, base, changed, crates_of, libraries, dependencies):
"""The checks for these changed files, in the order they run."""
rust = any(workspace_rust(path) for path in changed)
@@ -297,10 +307,10 @@ def plan(args, base, changed, crates_of, libraries, dependencies):
Step("Python tests", "python3 -m unittest discover -s tests", where="here",
skip=None if python else "no Python change", summary=unittest_passed),
Step("rustfmt", "cargo fmt --all -- --check", skip=None if rust else no_rust),
Step("clippy", f"cargo clippy {clippy_selection} --all-targets --locked -- -D warnings",
Step("clippy", f"cargo clippy {clippy_selection}{mod_features(clippy_crates)} --all-targets --locked -- -D warnings",
skip=None if rust else no_rust),
Step("tests" + (": workspace" if crates is None else f": {', '.join(crates)}" if crates else ""),
f"cargo test --locked {selection} --tests",
f"cargo test --locked {selection}{mod_features(crates)} --tests",
skip=test_skip, summary=tests_passed),
Step("doc tests", f"cargo test --locked {doc_selection} --doc",
skip=test_skip or (None if doc_crates else "no library touched"), summary=tests_passed),