Skip to content

fix: duplicated build started logs#5554

Merged
chenjiahan merged 1 commit intomainfrom
build_started_logs_0707
Jul 7, 2025
Merged

fix: duplicated build started logs#5554
chenjiahan merged 1 commit intomainfrom
build_started_logs_0707

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Fix the issue of duplicate build start logs being printed when running rsbuild build and using the environments configuration.

Screenshot 2025-07-07 at 12 54 05

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings July 7, 2025 05:06
@netlify
Copy link
Copy Markdown

netlify bot commented Jul 7, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 71aafd7
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/686b55efa1876600088c94b0
😎 Deploy Preview https://deploy-preview-5554--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 73 (🔴 down 2 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes duplicated “build started…” logs by only tapping the run hook on the first compiler instance in multi-compiler mode.

  • Introduces firstCompiler to select either the sole compiler or the first entry in MultiCompiler.compilers
  • Moves the run hook registration to firstCompiler so logs are emitted only once
Comments suppressed due to low confidence (1)

packages/core/src/provider/createCompiler.ts:123

  • Add a unit or integration test for a multi-compiler scenario to verify that only one "build started..." log is emitted.
    const firstCompiler = isMultiCompiler

@chenjiahan chenjiahan merged commit 09ac309 into main Jul 7, 2025
13 checks passed
@chenjiahan chenjiahan deleted the build_started_logs_0707 branch July 7, 2025 05:15
@chenjiahan chenjiahan mentioned this pull request Jul 8, 2025
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