fix(web-core): add ^build to turbo build deps#2585
Conversation
The local task config dropped the root's '^build' when overriding
'dependsOn' to add 'build:wasm'. As a result web-core's build can race
ahead of its workspace deps' builds — on a fresh CI checkout, when
@lynx-js/web-elements / @lynx-js/web-worker-rpc don't yet have a
'dist/index.js', web-core's rsbuild + rslib produces a partial dist
that downstream consumers (e.g. repl) then fail to bundle ('Module not
found: Can't resolve @lynx-js/web-worker-rpc' / missing
'dist/client/background/index.js').
Adding '^build' restores the workspace-dep ordering. The hash change
also busts the existing poisoned turbo cache.
|
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesBuild Task Dependency Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will degrade performance by 14.76%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | transform 1000 view elements |
40 ms | 46.9 ms | -14.76% |
Comparing fix/web-core-turbo-build-deps (a03803e) with main (5b6a33d)
Footnotes
-
26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Web Explorer#9557 Bundle Size — 900.02KiB (0%).a03803e(current) vs 87c1759 main#9531(baseline) Bundle metrics
|
| Current #9557 |
Baseline #9531 |
|
|---|---|---|
44.46KiB |
44.46KiB |
|
2.22KiB |
2.22KiB |
|
0% |
0% |
|
9 |
9 |
|
11 |
11 |
|
229 |
229 |
|
11 |
11 |
|
27.28% |
27.28% |
|
10 |
10 |
|
0 |
0 |
Bundle size by type no changes
| Current #9557 |
Baseline #9531 |
|
|---|---|---|
495.88KiB |
495.88KiB |
|
401.92KiB |
401.92KiB |
|
2.22KiB |
2.22KiB |
Bundle analysis report Branch fix/web-core-turbo-build-deps Project dashboard
Generated by RelativeCI Documentation Report issue
React External#1099 Bundle Size — 690.27KiB (0%).a03803e(current) vs 87c1759 main#1073(baseline) Bundle metrics
|
| Current #1099 |
Baseline #1073 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
17 |
17 |
|
5 |
5 |
|
8.59% |
8.59% |
|
0 |
0 |
|
0 |
0 |
Bundle analysis report Branch fix/web-core-turbo-build-deps Project dashboard
Generated by RelativeCI Documentation Report issue
React MTF Example#1115 Bundle Size — 206.69KiB (+0.04%).a03803e(current) vs 87c1759 main#1089(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch fix/web-core-turbo-build-deps Project dashboard Generated by RelativeCI Documentation Report issue |
React Example with Element Template#250 Bundle Size — 197.77KiB (-0.01%).a03803e(current) vs 87c1759 main#224(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch fix/web-core-turbo-build-deps Project dashboard Generated by RelativeCI Documentation Report issue |
React Example#7985 Bundle Size — 235.77KiB (0%).a03803e(current) vs 87c1759 main#7959(baseline) Bundle metrics
|
| Current #7985 |
Baseline #7959 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
197 |
197 |
|
80 |
80 |
|
44.85% |
44.85% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #7985 |
Baseline #7959 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
90.01KiB |
90.01KiB |
Bundle analysis report Branch fix/web-core-turbo-build-deps Project dashboard
Generated by RelativeCI Documentation Report issue
Summary
packages/web-platform/web-core's turbobuildtask only depended on its localbuild:wasm, missing^build. This caused turbo to startweb-core's TypeScript build before its workspace deps (@lynx-js/web-elements,@lynx-js/web-worker-rpc,@lynx-js/css-serializer, ...) had finished building, producing partialdist/output and intermittent CI failures (e.g.replfailing to resolve modules fromweb-core/dist).Adding
^buildmakes turbo wait for upstream workspace builds, matching the convention used by every other package in the repo.This was extracted from #2584 where the same fix unblocked Build (Ubuntu).
Test plan
Summary by CodeRabbit