Skip to content

Commit

Permalink
Turbopack build: Add missing Compiled successfully message (#67598)
Browse files Browse the repository at this point in the history
Somewhat surprisingly this fixes a lot of tests as they check for the
exact logline to determine if compilation was successful 😄

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
  • Loading branch information
timneutkens authored Jul 9, 2024
1 parent 92efb20 commit 88da170
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 54 deletions.
2 changes: 2 additions & 0 deletions packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1619,6 +1619,8 @@ export default async function build(

buildTraceContext = rest.buildTraceContext

Log.event('Compiled successfully')

telemetry.record(
eventBuildCompleted(pagesPaths, {
durationInSeconds: compilerDuration,
Expand Down
113 changes: 59 additions & 54 deletions test/turbopack-build-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7371,23 +7371,25 @@
"runtimeError": false
},
"test/integration/css-features/test/browserslist.test.js": {
"passed": [],
"failed": [
"passed": [
"Browserslist: New production mode should have compiled successfully",
"Browserslist: Old production mode should have compiled successfully"
],
"failed": [
"Browserslist: New production mode should've emitted a single CSS file",
"Browserslist: Old production mode should have compiled successfully",
"Browserslist: Old production mode should've emitted a single CSS file"
],
"pending": [],
"flakey": [],
"runtimeError": false
},
"test/integration/css-features/test/css-modules.test.js": {
"passed": [],
"failed": [
"passed": [
"CSS Modules: Import Exports production mode should have compiled successfully",
"CSS Modules: Import Global CSS production mode should have compiled successfully"
],
"failed": [
"CSS Modules: Import Exports production mode should've emitted a single CSS file",
"CSS Modules: Import Global CSS production mode should have compiled successfully",
"CSS Modules: Import Global CSS production mode should've emitted a single CSS file",
"CSS Modules: Importing Invalid Global CSS production mode should fail to build",
"Custom Properties: Fail for :root {} in CSS Modules production mode should fail to build",
Expand All @@ -7398,13 +7400,14 @@
"runtimeError": false
},
"test/integration/css-features/test/index.test.js": {
"passed": [],
"failed": [
"passed": [
"Custom Properties: Pass-Through IE11 production mode should have compiled successfully",
"Custom Properties: Pass-Through IE11 production mode should've emitted a single CSS file",
"Custom Properties: Pass-Through Modern production mode should have compiled successfully",
"Inline Comments: Minify production mode should have compiled successfully"
],
"failed": [
"Custom Properties: Pass-Through IE11 production mode should've emitted a single CSS file",
"Custom Properties: Pass-Through Modern production mode should've emitted a single CSS file",
"Inline Comments: Minify production mode should have compiled successfully",
"Inline Comments: Minify production mode should've emitted a single CSS file"
],
"pending": [],
Expand All @@ -7426,25 +7429,25 @@
"Catch-all Route CSS Module Usage production mode should apply styles correctly",
"Dynamic Route CSS Module Usage production mode should apply styles correctly",
"Has CSS Module in computed styles in Development should have CSS for page",
"Has CSS Module in computed styles in Production production mode should have CSS for page"
"Has CSS Module in computed styles in Production production mode should have CSS for page",
"Basic CSS Module Support production mode should have compiled successfully",
"3rd Party CSS Module Support production mode should have compiled successfully",
"CSS Module Composes Usage (Basic) production mode should have compiled successfully",
"Catch-all Route CSS Module Usage production mode should have compiled successfully",
"Dynamic Route CSS Module Usage production mode should have compiled successfully",
"Has CSS Module in computed styles in Production production mode should have compiled successfully",
"Valid CSS Module Usage from within node_modules production mode should have compiled successfully"
],
"failed": [
"3rd Party CSS Module Support production mode should have compiled successfully",
"3rd Party CSS Module Support production mode should've emitted a single CSS file",
"3rd Party CSS Module Support production mode should've injected the CSS on server render",
"Basic CSS Module Support production mode should have compiled successfully",
"Basic CSS Module Support production mode should've emitted a single CSS file",
"Basic CSS Module Support production mode should've injected the CSS on server render",
"CSS Module Composes Usage (Basic) production mode should have compiled successfully",
"CSS Module Composes Usage (Basic) production mode should've emitted a single CSS file",
"CSS Module Composes Usage (External) production mode should have compiled successfully",
"CSS Module Composes Usage (External) production mode should've emitted a single CSS file",
"Catch-all Route CSS Module Usage production mode should have compiled successfully",
"Catch-all Route CSS Module Usage production mode should've emitted a single CSS file",
"Dynamic Route CSS Module Usage production mode should have compiled successfully",
"Dynamic Route CSS Module Usage production mode should've emitted a single CSS file",
"Has CSS Module in computed styles in Production production mode should have compiled successfully",
"Valid CSS Module Usage from within node_modules production mode should have compiled successfully",
"Valid CSS Module Usage from within node_modules production mode should've emitted a single CSS file",
"Valid CSS Module Usage from within node_modules production mode should've prerendered with relevant data",
"Valid Nested CSS Module Usage from within node_modules production mode should have compiled successfully",
Expand All @@ -7459,39 +7462,40 @@
"runtimeError": false
},
"test/integration/css/test/basic-global-support.test.js": {
"passed": [],
"failed": [
"passed": [
"Basic Global Support production mode useLightnincsss(false) should compile successfully",
"Basic Global Support production mode useLightnincsss(false) should've emitted a single CSS file",
"Basic Global Support production mode useLightnincsss(true) should compile successfully",
"Basic Global Support production mode useLightnincsss(true) should've emitted a single CSS file",
"Basic Global Support with special characters in path production mode useLightnincsss(false) should compile successfully",
"Basic Global Support with special characters in path production mode useLightnincsss(false) should've emitted a single CSS file",
"Basic Global Support with special characters in path production mode useLightnincsss(true) should compile successfully",
"Basic Global Support with special characters in path production mode useLightnincsss(true) should've emitted a single CSS file",
"Basic Global Support with src/ dir production mode useLightnincsss(false) should compile successfully",
"Basic Global Support with src/ dir production mode useLightnincsss(false) should've emitted a single CSS file",
"Basic Global Support with src/ dir production mode useLightnincsss(true) should compile successfully",
"Basic Global Support with src/ dir production mode useLightnincsss(true) should've emitted a single CSS file",
"CSS URL via `file-loader` and asset prefix (1) production mode should compile successfully",
"CSS URL via `file-loader` and asset prefix (1) production mode should've emitted expected files",
"CSS URL via `file-loader` and asset prefix (2) production mode should compile successfully",
"CSS URL via `file-loader` and asset prefix (2) production mode should've emitted expected files",
"CSS URL via `file-loader` production mode useLightnincsss(false) should compile successfully",
"CSS URL via `file-loader` production mode useLightnincsss(false) should've emitted expected files",
"CSS URL via `file-loader` production mode useLightnincsss(true) should compile successfully",
"CSS URL via `file-loader` production mode useLightnincsss(true) should've emitted expected files",
"Multi Global Support (reversed) production mode useLightnincsss(false) should compile successfully",
"Multi Global Support (reversed) production mode useLightnincsss(false) should've emitted a single CSS file",
"Multi Global Support (reversed) production mode useLightnincsss(true) should compile successfully",
"Multi Global Support (reversed) production mode useLightnincsss(true) should've emitted a single CSS file",
"Multi Global Support production mode useLightnincsss(false) should compile successfully",
"Multi Global Support production mode useLightnincsss(false) should've emitted a single CSS file",
"Multi Global Support production mode useLightnincsss(true) should compile successfully",
"Multi Global Support production mode useLightnincsss(true) should've emitted a single CSS file",
"Nested @import() Global Support production mode useLightnincsss(false) should compile successfully",
"Nested @import() Global Support production mode useLightnincsss(true) should compile successfully"
],
"failed": [
"Basic Global Support production mode useLightnincsss(false) should've emitted a single CSS file",
"Basic Global Support production mode useLightnincsss(true) should've emitted a single CSS file",
"Basic Global Support with special characters in path production mode useLightnincsss(false) should've emitted a single CSS file",
"Basic Global Support with special characters in path production mode useLightnincsss(true) should've emitted a single CSS file",
"Basic Global Support with src/ dir production mode useLightnincsss(false) should've emitted a single CSS file",
"Basic Global Support with src/ dir production mode useLightnincsss(true) should've emitted a single CSS file",
"CSS URL via `file-loader` and asset prefix (1) production mode should've emitted expected files",
"CSS URL via `file-loader` and asset prefix (2) production mode should've emitted expected files",
"CSS URL via `file-loader` production mode useLightnincsss(false) should've emitted expected files",
"CSS URL via `file-loader` production mode useLightnincsss(true) should've emitted expected files",
"Multi Global Support (reversed) production mode useLightnincsss(false) should've emitted a single CSS file",
"Multi Global Support (reversed) production mode useLightnincsss(true) should've emitted a single CSS file",
"Multi Global Support production mode useLightnincsss(false) should've emitted a single CSS file",
"Multi Global Support production mode useLightnincsss(true) should've emitted a single CSS file",
"Nested @import() Global Support production mode useLightnincsss(false) should've emitted a single CSS file",
"Nested @import() Global Support production mode useLightnincsss(true) should compile successfully",
"Nested @import() Global Support production mode useLightnincsss(true) should've emitted a single CSS file"
],
"pending": [],
Expand All @@ -7501,26 +7505,26 @@
"test/integration/css/test/css-and-styled-jsx.test.js": {
"passed": [
"Ordering with styled-jsx (dev) should have the correct color (css ordering)",
"Ordering with styled-jsx (prod) production mode should have compiled successfully",
"Ordering with styled-jsx (prod) production mode should have the correct color (css ordering)"
],
"failed": [
"Ordering with styled-jsx (prod) production mode should have compiled successfully"
],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
},
"test/integration/css/test/css-compilation.test.js": {
"passed": [],
"passed": [
"CSS Support production mode CSS Compilation and Prefixing useLightnincsss(true) should compile successfully",
"CSS Support production mode CSS Compilation and Prefixing useLightnincsss(false) should compile successfully"
],
"failed": [
"CSS Property Ordering production mode useLightnincsss(false) should have compiled successfully",
"CSS Property Ordering production mode useLightnincsss(false) should have the border width (property ordering)",
"CSS Property Ordering production mode useLightnincsss(true) should have compiled successfully",
"CSS Property Ordering production mode useLightnincsss(true) should have the border width (property ordering)",
"CSS Support production mode CSS Compilation and Prefixing useLightnincsss(false) should compile successfully",
"CSS Support production mode CSS Compilation and Prefixing useLightnincsss(false) should've compiled and prefixed",
"CSS Support production mode CSS Compilation and Prefixing useLightnincsss(false) should've emitted a source map",
"CSS Support production mode CSS Compilation and Prefixing useLightnincsss(true) should compile successfully",
"CSS Support production mode CSS Compilation and Prefixing useLightnincsss(true) should've compiled and prefixed",
"CSS Support production mode CSS Compilation and Prefixing useLightnincsss(true) should've emitted a source map",
"CSS Support production mode Good CSS Import from node_modules useLightnincsss(false) should compile successfully",
Expand Down Expand Up @@ -7557,12 +7561,12 @@
"Ordering with Global CSS and Modules (dev) useLightnincsss(true) should not execute scripts in any order",
"Ordering with Global CSS and Modules (prod) production mode useLightnincsss(false) should have the correct color (css ordering)",
"Ordering with Global CSS and Modules (prod) production mode useLightnincsss(true) should have the correct color (css ordering)",
"should handle unresolved files gracefully production mode should build correctly"
"should handle unresolved files gracefully production mode should build correctly",
"Ordering with Global CSS and Modules (prod) production mode useLightnincsss(false) should have compiled successfully",
"Ordering with Global CSS and Modules (prod) production mode useLightnincsss(true) should have compiled successfully"
],
"failed": [
"Data URLs production mode should have emitted expected files",
"Ordering with Global CSS and Modules (prod) production mode useLightnincsss(false) should have compiled successfully",
"Ordering with Global CSS and Modules (prod) production mode useLightnincsss(true) should have compiled successfully",
"should handle unresolved files gracefully production mode should have correct file references in CSS output"
],
"pending": [
Expand Down Expand Up @@ -7643,12 +7647,13 @@
"runtimeError": false
},
"test/integration/css/test/valid-invalid-css.test.js": {
"passed": [],
"passed": [
"Valid Global CSS from npm production mode should compile successfully"
],
"failed": [
"Invalid CSS in _document production mode should fail to build",
"Invalid Global CSS production mode should fail to build",
"Invalid Global CSS with Custom App production mode should fail to build",
"Valid Global CSS from npm production mode should compile successfully",
"Valid Global CSS from npm production mode should've emitted a single CSS file",
"Valid and Invalid Global CSS with Custom App production mode should fail to build"
],
Expand Down Expand Up @@ -8106,8 +8111,7 @@
"runtimeError": false
},
"test/integration/draft-mode/test/index.test.ts": {
"passed": [],
"failed": [
"passed": [
"Test Draft Mode production mode should compile successfully",
"Test Draft Mode production mode should enable draft mode",
"Test Draft Mode production mode should not return fallback page on draft request",
Expand All @@ -8120,6 +8124,7 @@
"Test Draft Mode production mode should return prerendered page on second request",
"Test Draft Mode production mode should start production application"
],
"failed": [],
"pending": [
"Test Draft Mode development mode should disable draft mode",
"Test Draft Mode development mode should enable draft mode",
Expand Down Expand Up @@ -10612,8 +10617,7 @@
"runtimeError": false
},
"test/integration/getserversideprops-preview/test/index.test.js": {
"passed": [],
"failed": [
"passed": [
"ServerSide Props Preview Mode production mode should compile successfully",
"ServerSide Props Preview Mode production mode should enable preview mode",
"ServerSide Props Preview Mode production mode should not return fallback page on preview request",
Expand All @@ -10624,6 +10628,7 @@
"ServerSide Props Preview Mode production mode should start production application",
"ServerSide Props Preview Mode production mode should throw error when setting too large of preview data"
],
"failed": [],
"pending": [
"ServerSide Props Preview Mode development mode should enable preview mode",
"ServerSide Props Preview Mode development mode should fetch prerendered data",
Expand Down Expand Up @@ -13607,10 +13612,10 @@
"runtimeError": false
},
"test/integration/polyfilling-minimal/test/index.test.js": {
"passed": [],
"failed": [
"passed": [
"Polyfilling (minimal) production mode should compile successfully"
],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
Expand Down Expand Up @@ -13734,8 +13739,7 @@
"runtimeError": false
},
"test/integration/prerender-preview/test/index.test.js": {
"passed": [],
"failed": [
"passed": [
"Prerender Preview Mode production mode should compile successfully",
"Prerender Preview Mode production mode should enable preview mode",
"Prerender Preview Mode production mode should expire cookies with a maxAge",
Expand All @@ -13751,6 +13755,7 @@
"Prerender Preview Mode production mode should start production application",
"Prerender Preview Mode production mode should throw error when setting too large of preview data"
],
"failed": [],
"pending": [
"Prerender Preview Mode development mode should enable preview mode",
"Prerender Preview Mode development mode should fetch live static props with preview active",
Expand Down

0 comments on commit 88da170

Please sign in to comment.