Skip to content

fix: load API docs from published compiler data - #1432

Merged
fhammerschmidt merged 6 commits into
rescript-lang:masterfrom
fhammerschmidt:fix/1421-api-data
Oct 14, 2026
Merged

fhammerschmidt merged 6 commits into
rescript-lang:masterfrom
fhammerschmidt:fix/1421-api-data

Conversation

@fhammerschmidt

@fhammerschmidt fhammerschmidt commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Load API routes, navigation and page content from the compiler publications in the root data/api directory. Replace the stale app-local snapshots and select the newest numeric publication for the configured documentation major.

Validate each publication before using it, including library root modules and module data. Load snapshots on demand so importing routes during runtime SSR does not read API files.

Share the documentation major and publication selection between route loaders and the link checker. Use the route configuration and generator from #1442 to generate paths from the selected API modules.

Remove the obsolete app-local API snapshots and unused generator. The v13 website changes are tracked in #1433, with compiler publication changes in rescript#8753.

Merge after #1442.

Part of #1421.
Fixes #1391

Use the repository-root compiler publication for API routes, navigation,
and module content. Select the latest dataset within the configured docs
major and share version selection with link validation.

Remove obsolete snapshots, the unused TOC, and the legacy generator.
Add regression coverage for version selection, published data, and API links.

Fixes rescript-lang#1391
Part of rescript-lang#1421
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T17:30:41.575186Z 693123f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a6f1992eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/docs/src/data/ApiData.res Outdated
Require each library root and validate module fields before caching published API data. Fail invalid publications with their file and module paths instead of prerendering blank pages.

Add regression coverage for empty libraries, missing roots, and malformed root or child modules. Document the required publication structure.

Fixes rescript-lang#1391

Part of rescript-lang#1421
@fhammerschmidt

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 693123f9b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Integrate master through rescript-lang#1430 while retaining the published API data lookup and monorepo regression fixtures. Preserve exact route validation without duplicating the API route list during the merge.
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.
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.
Preserve published API data and shared route generation alongside the new static 404 handling. Remove the obsolete API introduction route from the configuration and generated path type.
@fhammerschmidt
fhammerschmidt merged commit bd49ade into rescript-lang:master Oct 14, 2026
11 checks passed
@fhammerschmidt
fhammerschmidt deleted the fix/1421-api-data branch October 14, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API reference serves v12.0.0-rc.5 data as "v12 (latest)"

2 participants