Skip to content

Add match logging to --debug-build-paths - #88909

Closed
devjiwonchoi wants to merge 1 commit into
canaryfrom
devjiwonchoi/debug-build-paths-log
Closed

Add match logging to --debug-build-paths#88909
devjiwonchoi wants to merge 1 commit into
canaryfrom
devjiwonchoi/debug-build-paths-log

Conversation

@devjiwonchoi

Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nextjs-bot

nextjs-bot commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Failing test suites

Commit: ece4fdd | About building and testing Next.js

pnpm test-start test/production/debug-build-path/debug-build-paths.test.ts (job)

  • debug-build-paths > default fixture > glob pattern matching > should exclude paths matching negation patterns (DD)
  • debug-build-paths > default fixture > glob pattern matching > should exclude dynamic route paths with negation (DD)
  • debug-build-paths > default fixture > glob pattern matching > should support multiple negation patterns (DD)
  • debug-build-paths > default fixture > glob pattern matching > should build everything except excluded paths when only negation patterns are provided (DD)
Expand output

● debug-build-paths › default fixture › glob pattern matching › should exclude paths matching negation patterns

expect(received).not.toContain(expected) // indexOf

Expected substring: not "/with-type-error"
Received string:        "  Pattern \"app/**/page.tsx,!app/with-type-error/**\" did match 5 files
▲ Next.js 16.2.0-canary.3 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Creating an optimized production build ...
✓ Compiled successfully in 1148ms
  Running TypeScript ...
  Finished TypeScript in 1255ms ...
  Collecting page data using 19 workers ...
  Generating static pages using 19 workers (0/5) ...
  Generating static pages using 19 workers (1/5) 
  Generating static pages using 19 workers (2/5) 
  Generating static pages using 19 workers (3/5) 
✓ Generating static pages using 19 workers (5/5) in 193ms
  Finalizing page optimization ...

Route (app)
┌ ○ /
├ ○ /_not-found
├ ○ /about
├ ƒ /blog/[slug]
├ ƒ /blog/[slug]/comments
└ ○ /dashboard


○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand

"

  180 |         expect(buildResult.cliOutput).toContain('○ /dashboard')
  181 |         expect(buildResult.cliOutput).toContain('/blog/[slug]')
> 182 |         expect(buildResult.cliOutput).not.toContain('/with-type-error')
      |                                           ^
  183 |       })
  184 |
  185 |       it('should exclude dynamic route paths with negation', async () => {

  at Object.toContain (production/debug-build-path/debug-build-paths.test.ts:182:43)

● debug-build-paths › default fixture › glob pattern matching › should exclude dynamic route paths with negation

expect(received).not.toContain(expected) // indexOf

Expected substring: not "/blog/[slug]/comments"
Received string:        "  Pattern \"app/blog/**/page.tsx,!app/blog/[slug]/comments/**\" did match 1 files
▲ Next.js 16.2.0-canary.3 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Creating an optimized production build ...
✓ Compiled successfully in 1120ms
  Running TypeScript ...
  Finished TypeScript in 1244ms ...
  Collecting page data using 19 workers ...
  Generating static pages using 19 workers (0/2) ...
✓ Generating static pages using 19 workers (2/2) in 168ms
  Finalizing page optimization ...

Route (app)
┌ ○ /_not-found
└ ƒ /blog/[slug]


○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand

"

  194 |         expect(buildResult.cliOutput).toContain('Route (app)')
  195 |         expect(buildResult.cliOutput).toContain('/blog/[slug]')
> 196 |         expect(buildResult.cliOutput).not.toContain('/blog/[slug]/comments')
      |                                           ^
  197 |       })
  198 |
  199 |       it('should support multiple negation patterns', async () => {

  at Object.toContain (production/debug-build-path/debug-build-paths.test.ts:196:43)

● debug-build-paths › default fixture › glob pattern matching › should support multiple negation patterns

expect(received).not.toContain(expected) // indexOf

Expected substring: not "/with-type-error"
Received string:        "  Pattern \"app/**/page.tsx,!app/with-type-error/**,!app/dashboard/**\" did match 4 files
▲ Next.js 16.2.0-canary.3 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Creating an optimized production build ...
✓ Compiled successfully in 1123ms
  Running TypeScript ...
  Finished TypeScript in 1271ms ...
  Collecting page data using 19 workers ...
  Generating static pages using 19 workers (0/4) ...
  Generating static pages using 19 workers (1/4) 
  Generating static pages using 19 workers (2/4) 
  Generating static pages using 19 workers (3/4) 
✓ Generating static pages using 19 workers (4/4) in 183ms
  Finalizing page optimization ...

Route (app)
┌ ○ /
├ ○ /_not-found
├ ○ /about
├ ƒ /blog/[slug]
└ ƒ /blog/[slug]/comments


○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand

"

  209 |         expect(buildResult.cliOutput).toContain('○ /')
  210 |         expect(buildResult.cliOutput).toContain('○ /about')
> 211 |         expect(buildResult.cliOutput).not.toContain('/with-type-error')
      |                                           ^
  212 |         expect(buildResult.cliOutput).not.toContain('○ /dashboard')
  213 |       })
  214 |

  at Object.toContain (production/debug-build-path/debug-build-paths.test.ts:211:43)

● debug-build-paths › default fixture › glob pattern matching › should build everything except excluded paths when only negation patterns are provided

expect(received).not.toContain(expected) // indexOf

Expected substring: not "/with-type-error"
Received string:        "  Pattern \"!app/with-type-error/**\" did match 31 files
▲ Next.js 16.2.0-canary.3 (Turbopack)
- Experiments (use with caution):
  ✓ strictRouteTypes (enabled by `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES`)

  Creating an optimized production build ...
✓ Compiled successfully in 1481ms
  Running TypeScript ...
  Finished TypeScript in 1288ms ...
  Collecting page data using 19 workers ...
  Generating static pages using 19 workers (0/8) ...
  Generating static pages using 19 workers (2/8) 
  Generating static pages using 19 workers (4/8) 
  Generating static pages using 19 workers (6/8) 
✓ Generating static pages using 19 workers (8/8) in 212ms
  Finalizing page optimization ...

Route (app)
┌ ○ /
├ ○ /_not-found
├ ○ /about
├ ƒ /blog/[slug]
├ ƒ /blog/[slug]/comments
└ ○ /dashboard

Route (pages)
┌ ƒ /api/hello
├ ○ /bar
└ ○ /foo

○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand

"

  224 |         expect(buildResult.cliOutput).toContain('○ /about')
  225 |         expect(buildResult.cliOutput).toContain('○ /foo')
> 226 |         expect(buildResult.cliOutput).not.toContain('/with-type-error')
      |                                           ^
  227 |       })
  228 |
  229 |       it('should log when pattern matches files', async () => {

  at Object.toContain (production/debug-build-path/debug-build-paths.test.ts:226:43)

@devjiwonchoi
devjiwonchoi force-pushed the devjiwonchoi/debug-build-paths-log branch from c99da62 to a7f906b Compare January 22, 2026 19:30
@@ -72,7 +72,11 @@ export async function resolveBuildPaths(
})) as string[]

if (matches.length === 0) {
Log.warn(`Pattern "${patterns.join(',')}" did not match any files`)
throw new Error(`Pattern "${patterns.join(',')}" did not match any files`)
} else {

@vercel vercel Bot Jan 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Log message includes negation patterns (prefixed with !) causing test failures when checking that excluded paths don't appear in output

Fix on Vercel

When glob patterns match files, log 'Pattern "..." did match N files'
to provide feedback on successful pattern matching.
@devjiwonchoi
devjiwonchoi force-pushed the devjiwonchoi/debug-build-paths-log branch from a7f906b to ece4fdd Compare January 22, 2026 20:30
@nextjs-bot

Copy link
Copy Markdown
Contributor

Stats from current PR

✅ No significant changes detected

📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 455ms 455ms ▁▁▁▁▁
Cold (Ready in log) 437ms 436ms ▁▂▁▁▁
Cold (First Request) 1.163s 1.127s ▁▃▂▁▃
Warm (Listen) 457ms 456ms ▁▁▁▂▁
Warm (Ready in log) 442ms 441ms ▁▁▁▁▁
Warm (First Request) 339ms 338ms ▂▁▁▂▂
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 456ms 455ms ▁▁▁▁▁
Cold (Ready in log) 440ms 441ms ▁▁▁▁▁
Cold (First Request) 1.837s 1.867s ▁▁▁▁▁
Warm (Listen) 456ms 455ms ▁▁▁▁▁
Warm (Ready in log) 439ms 439ms ▁▁▁▁▁
Warm (First Request) 1.852s 1.837s ▁▁▁▁▁

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 4.258s 4.313s ▁▁▁▂▁
Cached Build 4.293s 4.299s ▁▁▁▁▁
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 14.066s 14.141s ▄▂▂▂▂
Cached Build 14.180s 14.236s ▄▄▂▂▁
node_modules Size 460 MB 460 MB ▁▁▁▁▁
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles: **432 kB** → **432 kB** ✅ -58 B

82 files with content-based hashes (individual files not comparable between builds)

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 761 B 769 B 🔴 +8 B (+1%)
Total 761 B 769 B ⚠️ +8 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 451 B 450 B
Total 451 B 450 B ✅ -1 B

📦 Webpack

Client

Main Bundles
Canary PR Change
2086.HASH.js gzip 169 B N/A -
2161-HASH.js gzip 5.41 kB N/A -
2747-HASH.js gzip 4.48 kB N/A -
4322-HASH.js gzip 52.7 kB N/A -
ec793fe8-HASH.js gzip 62.3 kB N/A -
framework-HASH.js gzip 59.8 kB 59.8 kB
main-app-HASH.js gzip 251 B 253 B
main-HASH.js gzip 38.7 kB 39.1 kB
webpack-HASH.js gzip 1.68 kB 1.68 kB
1596.HASH.js gzip N/A 169 B -
2658-HASH.js gzip N/A 52.4 kB -
6349-HASH.js gzip N/A 4.46 kB -
7019-HASH.js gzip N/A 5.43 kB -
b17a3386-HASH.js gzip N/A 62.3 kB -
Total 226 kB 226 kB ⚠️ +54 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Total 39.4 kB 39.4 kB
Pages
Canary PR Change
_app-HASH.js gzip 194 B 193 B
_error-HASH.js gzip 182 B 182 B
css-HASH.js gzip 336 B 335 B
dynamic-HASH.js gzip 1.8 kB 1.8 kB
edge-ssr-HASH.js gzip 256 B 256 B
head-HASH.js gzip 352 B 349 B
hooks-HASH.js gzip 385 B 384 B
image-HASH.js gzip 580 B 580 B
index-HASH.js gzip 259 B 258 B
link-HASH.js gzip 2.5 kB 2.51 kB
routerDirect..HASH.js gzip 319 B 317 B
script-HASH.js gzip 385 B 387 B
withRouter-HASH.js gzip 316 B 315 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Total 7.97 kB 7.96 kB ✅ -8 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 126 kB 126 kB
page.js gzip 244 kB 240 kB 🟢 4.71 kB (-2%)
Total 370 kB 366 kB ✅ -4.58 kB
Middleware
Canary PR Change
middleware-b..fest.js gzip 617 B 619 B
middleware-r..fest.js gzip 155 B 156 B
middleware.js gzip 33 kB 33.2 kB
edge-runtime..pack.js gzip 842 B 842 B
Total 34.6 kB 34.9 kB ⚠️ +239 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 738 B 738 B
Total 738 B 738 B
Build Cache
Canary PR Change
0.pack gzip 3.71 MB 3.72 MB 🔴 +4.91 kB (+0%)
index.pack gzip 101 kB 100 kB
index.pack.old gzip 101 kB 102 kB
Total 3.91 MB 3.92 MB ⚠️ +4.92 kB

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 306 kB 306 kB
app-page-exp..prod.js gzip 163 kB 163 kB
app-page-tur...dev.js gzip 306 kB 306 kB
app-page-tur..prod.js gzip 163 kB 163 kB
app-page-tur...dev.js gzip 302 kB 302 kB
app-page-tur..prod.js gzip 161 kB 161 kB
app-page.run...dev.js gzip 303 kB 303 kB
app-page.run..prod.js gzip 161 kB 161 kB
app-route-ex...dev.js gzip 69.4 kB 69.4 kB
app-route-ex..prod.js gzip 48.2 kB 48.2 kB
app-route-tu...dev.js gzip 69.4 kB 69.4 kB
app-route-tu..prod.js gzip 48.2 kB 48.2 kB
app-route-tu...dev.js gzip 69 kB 69 kB
app-route-tu..prod.js gzip 47.9 kB 47.9 kB
app-route.ru...dev.js gzip 68.9 kB 68.9 kB
app-route.ru..prod.js gzip 47.9 kB 47.9 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 42.4 kB 42.4 kB
pages-api-tu..prod.js gzip 32.2 kB 32.2 kB
pages-api.ru...dev.js gzip 42.4 kB 42.4 kB
pages-api.ru..prod.js gzip 32.2 kB 32.2 kB
pages-turbo....dev.js gzip 51.7 kB 51.7 kB
pages-turbo...prod.js gzip 38.8 kB 38.8 kB
pages.runtim...dev.js gzip 51.7 kB 51.7 kB
pages.runtim..prod.js gzip 38.8 kB 38.8 kB
server.runti..prod.js gzip 62.3 kB 62.3 kB
Total 2.73 MB 2.73 MB ⚠️ +4 B

@devjiwonchoi
devjiwonchoi deleted the devjiwonchoi/debug-build-paths-log branch February 14, 2026 14:11
@github-actions github-actions Bot added the locked label Mar 1, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants