Skip to content

fix(web-core): add ^build to turbo build deps#2585

Merged
upupming merged 1 commit into
mainfrom
fix/web-core-turbo-build-deps
May 11, 2026
Merged

fix(web-core): add ^build to turbo build deps#2585
upupming merged 1 commit into
mainfrom
fix/web-core-turbo-build-deps

Conversation

@upupming
Copy link
Copy Markdown
Collaborator

@upupming upupming commented May 8, 2026

Summary

packages/web-platform/web-core's turbo build task only depended on its local build:wasm, missing ^build. This caused turbo to start web-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 partial dist/ output and intermittent CI failures (e.g. repl failing to resolve modules from web-core/dist).

Adding ^build makes 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

  • Chores
    • Updated build task configuration to improve build process sequencing.

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.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

⚠️ No Changeset found

Latest commit: a03803e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0d63b1ba-f472-4497-afe3-f6a347c9eeb5

📥 Commits

Reviewing files that changed from the base of the PR and between 5b6a33d and a03803e.

📒 Files selected for processing (1)
  • packages/web-platform/web-core/turbo.json

📝 Walkthrough

Walkthrough

The build task in packages/web-platform/web-core/turbo.json now depends on both the upstream ^build task and the local build:wasm task, ensuring builds execute in proper dependency order across the monorepo workspace.

Changes

Build Task Dependency Configuration

Layer / File(s) Summary
Task Dependency Configuration
packages/web-platform/web-core/turbo.json
The build task's dependsOn field now includes ^build in addition to build:wasm, establishing proper task sequencing with upstream workspace dependencies.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • lynx-family/lynx-stack#2538: Updates the same Turbo task dependency by adding the upstream ^build dependency to establish consistent build task ordering across the workspace.

Suggested labels

platform:Web

Suggested reviewers

  • PupilTong
  • Sherry-hue

Poem

🐰 A rabbit hops through build chains,
Dependencies align like mane strains,
^build and wasm now dance as one,
Tasks ordered perfect, build is done! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding the ^build dependency to the turbo build task configuration in web-core.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/web-core-turbo-build-deps

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 8, 2026

Merging this PR will degrade performance by 14.76%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 80 untouched benchmarks
⏩ 26 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

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)

Open in CodSpeed

Footnotes

  1. 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.

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

Web Explorer

#9557 Bundle Size — 900.02KiB (0%).

a03803e(current) vs 87c1759 main#9531(baseline)

Bundle metrics  no changes
                 Current
#9557
     Baseline
#9531
No change  Initial JS 44.46KiB 44.46KiB
No change  Initial CSS 2.22KiB 2.22KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 9 9
No change  Assets 11 11
No change  Modules 229 229
No change  Duplicate Modules 11 11
No change  Duplicate Code 27.28% 27.28%
No change  Packages 10 10
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#9557
     Baseline
#9531
No change  JS 495.88KiB 495.88KiB
No change  Other 401.92KiB 401.92KiB
No change  CSS 2.22KiB 2.22KiB

Bundle analysis reportBranch fix/web-core-turbo-build-depsProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

React External

#1099 Bundle Size — 690.27KiB (0%).

a03803e(current) vs 87c1759 main#1073(baseline)

Bundle metrics  no changes
                 Current
#1099
     Baseline
#1073
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 17 17
No change  Duplicate Modules 5 5
No change  Duplicate Code 8.59% 8.59%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#1099
     Baseline
#1073
No change  Other 690.27KiB 690.27KiB

Bundle analysis reportBranch fix/web-core-turbo-build-depsProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

React MTF Example

#1115 Bundle Size — 206.69KiB (+0.04%).

a03803e(current) vs 87c1759 main#1089(baseline)

Bundle metrics  Change 1 change
                 Current
#1115
     Baseline
#1089
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
Change  Cache Invalidation 46.16% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 192 192
No change  Duplicate Modules 77 77
No change  Duplicate Code 44.36% 44.36%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#1115
     Baseline
#1089
No change  IMG 111.23KiB 111.23KiB
Regression  Other 95.46KiB (+0.09%) 95.37KiB

Bundle analysis reportBranch fix/web-core-turbo-build-depsProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

React Example with Element Template

#250 Bundle Size — 197.77KiB (-0.01%).

a03803e(current) vs 87c1759 main#224(baseline)

Bundle metrics  Change 3 changes
                 Current
#250
     Baseline
#224
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
Change  Cache Invalidation 26.31% 26.39%
No change  Chunks 0 0
No change  Assets 4 4
Change  Modules 79(-1.25%) 80
No change  Duplicate Modules 23 23
Change  Duplicate Code 40.43%(+0.3%) 40.31%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Improvement 1 improvement
                 Current
#250
     Baseline
#224
No change  IMG 145.76KiB 145.76KiB
Improvement  Other 52.01KiB (-0.04%) 52.03KiB

Bundle analysis reportBranch fix/web-core-turbo-build-depsProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

React Example

#7985 Bundle Size — 235.77KiB (0%).

a03803e(current) vs 87c1759 main#7959(baseline)

Bundle metrics  no changes
                 Current
#7985
     Baseline
#7959
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 197 197
No change  Duplicate Modules 80 80
No change  Duplicate Code 44.85% 44.85%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7985
     Baseline
#7959
No change  IMG 145.76KiB 145.76KiB
No change  Other 90.01KiB 90.01KiB

Bundle analysis reportBranch fix/web-core-turbo-build-depsProject dashboard


Generated by RelativeCIDocumentationReport issue

@upupming upupming merged commit 4b27356 into main May 11, 2026
83 of 86 checks passed
@upupming upupming deleted the fix/web-core-turbo-build-deps branch May 11, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants