Repository navigation
fix: generate route types from the live route configuration - #1442
Open
fhammerschmidt wants to merge 1 commit into
Open
fhammerschmidt wants to merge 1 commit into
fhammerschmidt wants to merge 1 commit into
Conversation
Move the build-time route table to native JavaScript so React Router and route generation share one configuration without requiring compiled ReScript first. Generate the shared Path.res before compilation, handle nested layouts and index routes, omit URL patterns, and detect stale output in CI. Add regression tests for content discovery, deterministic output, and non-writing checks from any working directory. Fixes rescript-lang#1408. Part of rescript-lang#1421.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
fhammerschmidt
added a commit
to fhammerschmidt/rescript-lang.org
that referenced
this pull request
Oct 9, 2026
Integrate rescript-lang#1442, keep API routes on the published v12 dataset, and regenerate Path.res from that dataset. Remove the superseded ReScript route table without restoring legacy API JSON. Merge rescript-lang#1442 before this PR. Fixes rescript-lang#1391. Part of rescript-lang#1421.
This was referenced Oct 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The route-type generator imported a missing
app/routes.mjsand wrote to the oldsrc/Path.reslocation. The shared route union was maintained manually, omitted live pages, and still accepted deleted paths and/undefined.DocsRoutes.resintoapps/docs/route-config.mjs, consumed by React Router, prerender configuration, and route-type generation. Native Node loading removes the ReScript compilation bootstrap dependency and makes paths independent of the working directory.packages/shared/src/Path.resfrom the nested route tree, including index pages, MDX pages, and API modules. Deduplicate and sort concrete URLs; omit layout-only entries, parameters, and catch-all patterns./undefined, six deleted syntax pages, and/*. Most of the generated-file diff is deterministic sorting.yarn build:routesand the non-writingyarn check:routes.Targets website
master(v12), onfix/1421-route-types. No compiler repository changes.Compatibility: #1432 also changes the API route source. That PR now integrates this configuration and retains published v12 API-data selection. Merge this PR before #1432.
Validation:
Fixes #1408.
Part of #1421.