-
-
Notifications
You must be signed in to change notification settings - Fork 234
feat: improve build time logs with error state #6608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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 enhances build time logging by adding error state awareness to distinguish between successful and failed builds. When a build fails, the log message will now indicate the failure state and use the error logger instead of the ready logger.
Key Changes
- Modified
printTimefunction to accept ahasErrorsparameter and adjust the log message and logger method accordingly - Moved the
printTimecall after error/warning message formatting to ensure proper message ordering - Added comprehensive test coverage for both successful and failed builds in dev and build modes
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/provider/createCompiler.ts | Updated printTime function to handle error states with conditional logger and message formatting; reordered execution to print time after error messages |
| e2e/cases/diagnostic/build-time/src/index.js | Added empty source file for successful build time test |
| e2e/cases/diagnostic/build-time/index.test.ts | Added tests to verify build time is logged correctly for successful builds |
| e2e/cases/diagnostic/build-failed-time/src/index.js | Added source file with invalid import to trigger build failure |
| e2e/cases/diagnostic/build-failed-time/index.test.ts | Added tests to verify build failed time is logged correctly for failed builds |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Summary
Add error state awareness to build time logging to distinguish between successful and failed builds.
built in xx sbuild failed in xx sRelated Links
Checklist