Skip to content

chore: additional explanation if prerender fails#1849

Open
teemingc wants to merge 1 commit intomainfrom
teemingc-patch-1
Open

chore: additional explanation if prerender fails#1849
teemingc wants to merge 1 commit intomainfrom
teemingc-patch-1

Conversation

@teemingc
Copy link
Member

@teemingc teemingc commented Mar 7, 2026

@Rich-Harris if we update a type definition without changing a documentation page which uses it in a code block, twoslash will reuse a cached version of the code block that references an id which may no longer exist. This will cause the prerendering to fail with "this page referenced an ID that does not exist".

This PR adds remediation steps if the prerendering ever fails and that is the case

EDIT: In hindsight, I wonder if this means there are pages which do not update their codeblock rendered "types on hover" when we update their types. Maybe we need to ditch caching entirely or just make sure to invalidate the cache when deploying on main

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time.
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.

Updated error message to include cache deletion instructions.
@vercel
Copy link

vercel bot commented Mar 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
svelte-dev Ready Ready Preview Mar 7, 2026 4:35pm

Request Review

@Rich-Harris
Copy link
Member

Ha, there's a reason this is one of computer science's two hard things #1841 (review)

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.

2 participants