Skip boundary.sx in component loader
boundary.sx files use define-page-helper which isn't an SX eval form — they're parsed by boundary_parser.py. Exclude them from load_sx_dir() to prevent EvalError on startup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -86,10 +86,15 @@ def _compute_component_hash() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def load_sx_dir(directory: str) -> None:
|
def load_sx_dir(directory: str) -> None:
|
||||||
"""Load all .sx files from a directory and register components."""
|
"""Load all .sx files from a directory and register components.
|
||||||
|
|
||||||
|
Skips boundary.sx — those are parsed separately by the boundary validator.
|
||||||
|
"""
|
||||||
for filepath in sorted(
|
for filepath in sorted(
|
||||||
glob.glob(os.path.join(directory, "*.sx"))
|
glob.glob(os.path.join(directory, "*.sx"))
|
||||||
):
|
):
|
||||||
|
if os.path.basename(filepath) == "boundary.sx":
|
||||||
|
continue
|
||||||
with open(filepath, encoding="utf-8") as f:
|
with open(filepath, encoding="utf-8") as f:
|
||||||
register_components(f.read())
|
register_components(f.read())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user