build-modules: skip modules whose source isn't in the tree instead of failing
CI / test (push) Failing after 29s

just run depends on just modules; a component listed in components.txt without a
built core module (pulse, tasks, layout, ...) aborted the whole build. It now warns
and carries on, so the panel loads whichever modules do exist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-24 23:38:40 -08:00
1 parent 0145981c6a
commit 783618b89f
1 file changed
+5 -1
+5 -1
View File
@@ -20,7 +20,11 @@ while read -r name world; do
case "$world" in *-widget) ;; *) continue;; esac case "$world" in *-widget) ;; *) continue;; esac
if [ ${#want[@]} -gt 0 ] && [[ ! " ${want[*]} " =~ " $name " ]]; then continue; fi if [ ${#want[@]} -gt 0 ] && [[ ! " ${want[*]} " =~ " $name " ]]; then continue; fi
core="_build/wasm/release/build/components/$name/gen/gen.wasm" core="_build/wasm/release/build/components/$name/gen/gen.wasm"
[ -f "$core" ] || { echo "error: $core missing" >&2; exit 1; } if [ ! -f "$core" ]; then
# Listed in components.txt but its source isn't in the tree (yet): skip it, don't fail the build.
echo " $name: skipped (no source: $core missing)" >&2
continue
fi
out="build/components/$name.wasm" out="build/components/$name.wasm"
wasm-tools component embed wit "$core" --world "$world" --encoding utf16 -o "build/components/$name.embed.wasm" wasm-tools component embed wit "$core" --world "$world" --encoding utf16 -o "build/components/$name.embed.wasm"
wasm-tools component new "build/components/$name.embed.wasm" -o "$out" wasm-tools component new "build/components/$name.embed.wasm" -o "$out"