Add CollapseWebPaths test: transitive-dependency res must be registered - #153
Open
beaucollins wants to merge 1 commit into
Open
Add CollapseWebPaths test: transitive-dependency res must be registered#153beaucollins wants to merge 1 commit into
beaucollins wants to merge 1 commit into
Conversation
Transitive-dependency res is staged under a nested `release/res/<module>/res` path, but generateImageRegistry only scans the immediate children of `src/` (DiskUtils::listDirectory(sourceDirectory)). Transitive modules' images are copied into the package yet never added to `_image_registry.js`, so getAssets() resolves them to nothing at runtime and the icons render blank. Only the direct dependency (whose res sits at top-level `src/<module>/res`) is registered. This test builds a package with a direct-dep res and a transitive-dep res (staged under `release/res/shared/res`) and asserts both appear in the registry. It fails on the current renderer because the transitive entry is dropped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📊 PR Size: size/STotal changes: 39 lines (1 files) Top files changed:
Size calculated as additions + deletions. Labels: XS (<10), S (<50), M (<250), L (<1000), XL (1000+) |
|
| Test Suite | Result |
|---|---|
| API Surface Check | ✅ success |
| Linux: Module Tests | ✅ success |
| valdi_web Integration Test | ❌ failure |
| Snapshot Tests | ✅ success |
| Valdi Smoke Tests | ✅ success |
| Linux: Build & Export | ✅ success |
| Linux: C++ Tests | ❌ failure |
| Linux: Hotreload Smoke | ✅ success |
| Linux: Build Compiler | ✅ success |
| macOS: C++ & Platform Tests | ✅ success |
| Linux: Registry Validation | ✅ 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
CollapseWebPathsunit test that documents a regression on this branch (#148): transitive-dependencyres/images are copied into the web package but never registered in_image_registry.js, sogetAssets()can't resolve them at runtime and the icons render blank.Root cause
valdi/compiler/toolbox/src/valdi/compiler_toolbox/CollapseWebPaths.cppgenerateImageRegistry(L274) scans only the immediate children ofsrc/for<module>/res(DiskUtils::listDirectory(sourceDirectory), L276). The collapse stages direct-dep res at top-levelsrc/<module>/res(registered) but transitive-dep res at a nestedsrc/release/res/<module>/res(never scanned). Observed on a real package: only the direct module appeared in_image_registry.js; ~20coreuiicons and other transitive res were bundled but unregistered.Repro
TEST(CollapseWebPaths, registersTransitiveDependencyResources)builds a package with a direct-dep res and a transitive-dep res (staged underrelease/res/shared/res) and asserts both appear in the registry. It fails on this branch because the transitive entry is dropped.Suggested fix
Enumerate
resunder the nestedrelease/res/<module>/reslocations too (or stage all module res uniformly atsrc/<module>/res), so the registry matches the full transitive web-dep closure.