makepad/tools/check_vj_wasm_time.sh
Admin d26814e045 platform, apps: deterministic app capture, one app registry, makepad-app-* names, and the platform fixes the Stage editor found -- the remote service gains a virtual clock (--virtual-clock; /step advances whole frames and answers after they are presented, bounded to 20 s), /settled, widget id paths in /snap (q=path:), in-process MP4 capture on that clock (/cap/start|stop|pause|resume, no overlay in the file), --window WxH@scale, a synthetic cursor drawn into frames and --seed; with those flags off nothing changes. Passes that sample another pass's target stay dirty until their source has drawn (black first frames under parallel load), a shader still compiling marks its pass dirty, the Mac text shader gets its pass's camera on the first draw, and texture readbacks go to the requester that asked (try_take_texture_readbacks_for). Splash: obj.delete removes a field, for-loop keys compare equal to their @id, a loop ending a module no longer empties the stack, and a call-scope leak is closed. CEF: one exclusive profile per process, relaunch handled without a Chrome window, JS dialogs suppressed, popups become embedded tabs, one app bundle per build. Speech: Kokoro reports word timings, whisper aligns known text (align_text) and word times are no longer a token late. libs/app_registry is the one list of apps (the WM and Builder read it, Stage finds apps by id); every app crate in apps/ is package and binary makepad-app-<id>. AGENTS.md records the current agent workflow and the rule against rm on a possibly empty variable.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 01:55:13 +02:00

153 lines
4.4 KiB
Bash
Executable file

#!/bin/bash
set -euo pipefail
repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$repo_root"
# Keep cap-linted dependency artifacts from an ordinary build from satisfying
# a later primary-package lint invocation without actually running Clippy.
export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$repo_root/target/vj-wasm-time-gate}"
tree=''
add_tree() {
tree+=$'\n'"$(cargo tree \
-p "$1" \
"${@:2}" \
--target wasm32-unknown-unknown \
-e normal \
--prefix none \
--offline \
--format '{p}|{f}')"
}
# Use each web app's shipped feature set; the union below preserves the
# feature-resolved wasm graph for every demo while linting shared crates once.
add_tree makepad-app-route --no-default-features --features demo
add_tree makepad-app-files --no-default-features --features demo
add_tree makepad-app-sheets
add_tree makepad-app-finance --no-default-features --features demo
# The VJ web build was this gate's fifth graph. The app, the asset system and
# their private closure live in the Stage repository now, with their half of
# this gate (tools/check_vj_wasm_time.sh there). The libraries of this
# workspace that only that graph put on wasm stay linted here, as library
# roots with the features it built them with (all defaults).
library_roots=(
makepad-render
makepad-score-view
makepad-xr
makepad-ai-hub-ui
makepad-archive-org
makepad-drumkit
makepad-frametween
makepad-mp4-index
makepad-piano-model
makepad-show-control
makepad-system-speech
makepad-audio-encode
makepad-audio-picture
makepad-rtsmap
makepad-midi-file
makepad-video-flow
)
for name in "${library_roots[@]}"; do
add_tree "$name"
done
workspace=$(cargo metadata --format-version 1 --no-deps --offline)
package_args=()
feature_args=()
checked_names=()
seen='|'
while IFS='|' read -r package features; do
[[ "$package" == *" ($repo_root/"* ]] || continue
[[ "$features" != *" (*)"* ]] || continue
name=${package%% *}
manifest_dir=${package##*\(}
manifest_dir=${manifest_dir%\)}
manifest="$manifest_dir/Cargo.toml"
# Nested standalone workspaces have their own lint policy. This gate is
# the root workspace's complete library union for the web-demo wasm graphs.
[[ "$workspace" == *"\"manifest_path\":\"$manifest\""* ]] || continue
case "$name" in
makepad-app-route|makepad-app-files|makepad-app-sheets|makepad-app-finance)
continue
;;
esac
if [[ -n "$features" ]]; then
IFS=',' read -r -a package_features <<< "$features"
for feature in "${package_features[@]}"; do
feature_args+=("$name/$feature")
done
fi
[[ "$seen" != *"|$name|"* ]] || continue
seen="$seen$name|"
package_args+=(-p "$name")
checked_names+=("$name")
done <<< "$tree"
# The asset crates this list named (store, importer, chat, chat-ui, data) are
# required by the Stage half. `makepad-core-util` holds the hashing and socket
# code this graph used to reach in `makepad-asset-data` and
# `makepad-asset-client`.
required=(
makepad-platform
makepad-network
makepad-system-speech
makepad-sqlite
makepad-widgets
makepad-audio-encode
makepad-render
makepad-tsdf
makepad-svg
makepad-core-util
makepad-filesystem-watcher
makepad-video-flow
makepad-archive-org
makepad-error-log
makepad-splat
)
for name in "${required[@]}"; do
if [[ "$seen" != *"|$name|"* ]]; then
echo "missing web-demo wasm dependency: $name" >&2
exit 1
fi
done
clippy_lints=(
-A clippy::all
-D clippy::disallowed_types
-D clippy::disallowed_methods
)
echo "checking wasm dependency libraries: ${checked_names[*]}"
cargo clippy \
"${package_args[@]}" \
--lib \
--no-default-features \
--features "$(IFS=,; echo "${feature_args[*]}")" \
--target wasm32-unknown-unknown \
--offline \
--no-deps \
-- \
"${clippy_lints[@]}"
check_app() {
echo "checking $1"
cargo clippy \
-p "$1" \
"${@:2}" \
--target wasm32-unknown-unknown \
--offline \
--no-deps \
-- \
"${clippy_lints[@]}"
}
check_app makepad-app-route --no-default-features --features demo
check_app makepad-app-files --no-default-features --features demo
check_app makepad-app-sheets
check_app makepad-app-finance --no-default-features --features demo