Web build pipeline fixes for #148 - #178
Conversation
Fixes found while integrating the web build into a downstream consumer: - valdi_compiled.bzl: declare web output flavor from the compiler's web_output_target (release only when android+ios targets are release and the build isn't forced to debug) instead of output_flavor alone, so debug-target modules (e.g. jasmine) no longer mis-declare web/release outputs the compiler never writes. - CollapseWebPaths.cpp: recursively collect module res directories and break out of the per-dir image scan so transitively-staged res dirs still register (previously blank icons at runtime). - valdi_collapse_web_paths.bzl: skip non-web source files in the native pass so paths that would escape the -o output tree no longer fail under a strict sandbox; keep real module names for compiler-generated web/<flavor>/res. - web_path_browserify_shim.js.tpl: preserve leading ".." segments when normalizing relative paths. - web_webpack.config.js.tpl + web_bytes_loader.js.tpl + wiring: replace the non-existent 'asset/bytes' module type with a custom loader that emits .bin/.protodecl resources as Uint8Array. - HotReloadLifecycleReporter.swift: serialize lifecycle writes with an NSLock so concurrent lines from different queues are not interleaved. - docs + skill: clarify that a custom-view binds via exactly one mechanism (viewFactory or a platform class), never both. Based on the web build branch.
Sensitive Files Detected🔧 Build rules — Affects build rules for all Valdi consumers. This is an automated notice. A maintainer will review after import. |
📊 PR Size: size/MTotal changes: 235 lines (12 files) Top files changed:
...and 2 more files Size calculated as additions + deletions. Labels: XS (<10), S (<50), M (<250), L (<1000), XL (1000+) |
|
| Test Suite | Result |
|---|---|
| Valdi Smoke Tests | ✅ success |
| API Surface Check | ✅ success |
| valdi_web Integration Test | ❌ failure |
| Linux: C++ Tests | ❌ failure |
| Snapshot Tests | ✅ success |
| Linux: Build & Export | ✅ success |
| Linux: Build Compiler | ✅ success |
| Test Coverage Delta | ❌ failure |
| macOS: C++ & Platform Tests | ❌ failure |
| Linux: Hotreload Smoke | ✅ success |
| Linux: Registry Validation | ✅ success |
| Linux: Module Tests | ✅ success |
Some tests failed. Please check the workflow logs for details.
🚀 Bazel remote cache is now enabled - future builds will be faster!
Workflow: Valdi CI
CI failure triageNone of the current failures are introduced by this PR. Comparing against the base branch's own most recent
Linux: C++ Tests is the only job that differs from base. It's a test-target timeout — the runtime unit-test binary hung on This PR's diff touches nothing linked into that binary:
So that binary is identical to base (which passed) — a timing-flaky timeout on this run, not a regression. A re-run of Linux: C++ Tests should go green. The three pre-existing failures are unrelated to these build-pipeline fixes and also fail on the base branch. |
Fixes found while integrating #148's web build into a downstream consumer. Based on #148.
Fixes
web_output_target(valdi_compiled.bzl): a module emits/consumesweb/releaseonly when both the android and ios output targets are release and the build isn't forced to debug; otherwiseweb/debug. Keying offoutput_flavoralone mis-declaredweb/releaseoutputs for debug-target modules (e.g. jasmine) that the compiler only ever writes asweb/debug.resdirectories (CollapseWebPaths.cpp): recursively collect every moduleresdirectory andbreakout of the per-directory image scan so transitively-stagedresdirs are still registered. Previously only immediate children ofsrc/were scanned, so transitive-dependency images were bundled but never registered (blank icons at runtime).valdi_collapse_web_paths.bzl): source files with noweb/segment fall back to a raw path that would escape the-ooutput directory and fail under a strict sandbox; skip them (they are placed by the main collapse pass) and preserve real module names for compiler-generatedweb/<flavor>/res...in the path shim (web_path_browserify_shim.js.tpl): relative-path normalization no longer drops leading parent-directory segments.asset/bytes(web_webpack.config.js.tpl+ newweb_bytes_loader.js.tpl+ wiring invaldi_web_application.bzl/app_templates/BUILD.bazel): webpack has no built-in byte-array module type, so.bin/.protodeclresources are emitted asUint8Arrayvia a custom loader.HotReloadLifecycleReporter.swift): events are emitted from multiple queues; anNSLockserializes writes so concurrent lines are not interleaved.native-customviews.md, custom-view skill): a<custom-view>binds its native view via exactly one mechanism — aviewFactoryor a platform class name — never both.