Skip to content
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

Turbopack doesn't correctly handle catch-all segments in nested route groups #67045

Closed
grahamorrell opened this issue Jun 19, 2024 · 2 comments · Fixed by #68800
Closed

Turbopack doesn't correctly handle catch-all segments in nested route groups #67045

grahamorrell opened this issue Jun 19, 2024 · 2 comments · Fixed by #68800
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. locked Turbopack Related to Turbopack with Next.js.

Comments

@grahamorrell
Copy link

Link to the code that reproduces this issue

https://github.com/NorthLink-Digital/turbo-catch-all-issue

To Reproduce

Above repo is plain create-next-app with minimal folders/pages added to recreate the issue

Start in normal dev mode (pnpm dev)

Start in dev turbo mode (pnpm dev:turbo)

Current vs. Expected behavior

Following the steps in the previous section, when running with turbo, when hitting http://localhost:3000/admin I should see ADMIN PAGE not CMS PAGE

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 32603
  Available CPU cores: 8
Binaries:
  Node: 20.9.0
  npm: N/A
  Yarn: N/A
  pnpm: 8.6.10
Relevant Packages:
  next: 14.2.4 // Latest available version is detected (14.2.4).
  eslint-config-next: 14.2.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Turbopack

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

@grahamorrell grahamorrell added the bug Issue was opened via the bug report template. label Jun 19, 2024
@github-actions github-actions bot added the Turbopack Related to Turbopack with Next.js. label Jun 19, 2024
@timneutkens timneutkens added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label Jul 12, 2024
@timneutkens
Copy link
Member

timneutkens commented Jul 12, 2024

Thanks for the report and reproduction! Very helpful 🙏

timneutkens pushed a commit that referenced this issue Jul 24, 2024
(generated by graphite)

### What?

Introduce `get_specificity` method to determine the specificity of
routes.
This facilitates more accurate route matching for catchall routes by
comparing route specificity.
Modify existing route matching logic to incorporate specificity checks
and avoid route conflicts.
Add corresponding tests to validate the new specificity handling
mechanism.

Fixes #67045
Closes PACK-3154
Copy link
Contributor

github-actions bot commented Sep 4, 2024

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot added the locked label Sep 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. locked Turbopack Related to Turbopack with Next.js.
Projects
None yet
3 participants