Skip to content

fix: avoid printing the version number multiple times#1470

Merged
yifancong merged 1 commit intomainfrom
fix/log-rsdoctor-version
Jan 7, 2026
Merged

fix: avoid printing the version number multiple times#1470
yifancong merged 1 commit intomainfrom
fix/log-rsdoctor-version

Conversation

@yifancong
Copy link
Contributor

@yifancong yifancong commented Jan 7, 2026

Summary

fix: avoid printing the version number multiple times
image

Related Links

Copilot AI review requested due to automatic review settings January 7, 2026 03:33
@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for rsdoctor ready!

Name Link
🔨 Latest commit 72575b5
🔍 Latest deploy log https://app.netlify.com/projects/rsdoctor/deploys/695dd42746c1ad00093a28bf
😎 Deploy Preview https://deploy-preview-1470--rsdoctor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
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 addresses an issue where the Rsdoctor version number was being printed multiple times by implementing a module-level flag to track whether the greeting has already been displayed. The fix ensures that the version greeting is only shown once per process, even when multiple compiler instances or child compilers are involved.

Key Changes

  • Introduced a hasGreeted module-level flag in both webpack and rspack plugins
  • Added conditional logic to check the flag and compiler.isChild() before printing the greeting
  • Applied consistent implementation across both webpack-plugin and rspack-plugin packages

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/webpack-plugin/src/plugin.ts Added module-level hasGreeted flag and conditional logic in apply() method to prevent duplicate version greetings
packages/rspack-plugin/src/plugin.ts Added module-level hasGreeted flag and conditional logic in apply() method to prevent duplicate version greetings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yifancong yifancong requested a review from fansenze January 7, 2026 04:01
@yifancong yifancong enabled auto-merge (squash) January 7, 2026 04:03
@yifancong yifancong merged commit dbb26ae into main Jan 7, 2026
15 of 16 checks passed
@yifancong yifancong deleted the fix/log-rsdoctor-version branch January 7, 2026 08:34
@yifancong yifancong mentioned this pull request Jan 14, 2026
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.

3 participants