Fix: auto-include router spec module when boot adapter is present

boot.sx uses parse-route-pattern from router.sx, but router was only
included as an opt-in spec module. Now auto-included when boot is in
the adapter set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 23:53:55 +00:00
parent b1f9e41027
commit 732923a7ef
2 changed files with 78 additions and 1 deletions

View File

@@ -1199,6 +1199,9 @@ def compile_ref_to_js(
if sm not in SPEC_MODULES:
raise ValueError(f"Unknown spec module: {sm!r}. Valid: {', '.join(SPEC_MODULES)}")
spec_mod_set.add(sm)
# boot.sx uses parse-route-pattern from router.sx
if "boot" in adapter_set:
spec_mod_set.add("router")
has_deps = "deps" in spec_mod_set
has_router = "router" in spec_mod_set