next.js
52d2e42a - Improve Go route validation diagnostics (#102579)

Commit
3 hours ago
Improve Go route validation diagnostics (#102579) ### What? Show which route files and `go.mod` files cause Go route validation errors. Preserve JSON key order in cached Go route config. ### Why? The diagnostics should point to the files developers need to change, and a change in config key order should invalidate the cached value. ### How? Share `StyledString` diagnostics between dev and production and use `OrderedJsonValue` for cached config. Remove the gated `next start` test for an encoded path that also returns 404 with `route.ts`. The adapter test still covers the encoded path. Addresses Tobias's [diagnostics](https://github.com/vercel/next.js/pull/101985#discussion_r4737275002) and [ordered JSON](https://github.com/vercel/next.js/pull/101985#discussion_r4737313410) review comments on #101985. ### Verification - Focused Turbopack dev and production tests for Go route diagnostics, the shared worker, and the Go adapter's routing and config. - Native route runtime unit tests, TypeScript, ESLint, Prettier, and Rust formatting. - Hosted deployment tests were not run; the deployment harness does not have a Go adapter. <!-- NEXT_JS_LLM --> --------- Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
Author
Parents
Loading