Skip to content

Link Lua API members to the verified line in Git - #394

Draft
tony wants to merge 3 commits into
fix/lua-example-build-recipesfrom
lua-declaration-links
Draft

tony wants to merge 3 commits into
fix/lua-example-build-recipesfrom
lua-declaration-links

Conversation

@tony

@tony tony commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

A cached Lua API export can point readers to the wrong method after the source file is restored. On Lua master, the link for Runtime:connect opened the declaration of spawn ten lines later.

The reference now compares each exported Lua file’s SHA-256 with the Git blob at the revision its link will open. A fresh export links directly to connect. When the bytes differ, the page keeps the signature, description and examples. The source viewer reads the same committed bytes.

Verification

  • The public-source replay opened spawn at line 1064 before the fix. A fresh export now opens connect at line 1054. The stale export kept the other 17 verified files.
  • Built the reference for the public v0.1.1 tag and opened Runtime:connect in Chromium. Clicking Source displayed the declaration at line 1046 beside the page. Escape closed it. The example on the same page installs 0.1.1-1, and its launcher matches the file in the tag byte for byte.
  • The Lua adapter, example tests and source-cache checks passed. The cache also retained the published file when the checkout used a local Git replacement ref.

Dependencies

The website changes build on the Lua install recipes. Current native tooling provides declaration hashes, and historical exports also need support for the tagged launcher and declarations. Website install recipes · Native file hashes · Tagged launcher · Historical types.

Closes #387.

why: Lua checkout examples use APIs absent from the numbered rock.
The Watch example also requires a newer tmux than the general floor.

what:
- Build the cited SCM rock for source-bound examples.
- Resolve numbered recipes from the selected Git tag and release file.
- Check exported example bytes and retain legacy launcher commands.
@tony tony added the no-preview Run CI without publishing a PR preview. label Dec 5, 2026
@tony
tony force-pushed the lua-declaration-links branch from 74cd781 to ff09f04 Compare December 5, 2026 18:55
tony added 2 commits December 5, 2026 13:13
why:
The shared guide also appears beside older Lua releases. Their reference
lacks the methods used to start and stop a private server.

what:
- Link both calls to the lines in the cited checkout and describe the
  session that the program reads.
why: A cached export of Runtime:connect could open Runtime:spawn after
the checkout was restored. The two exports named the same Git revision.

what:
- Compare the exporter’s file hashes with the exact blobs readers open.
- Keep the API text and examples when a source line cannot be verified.
- Read the same committed bytes when building the source viewer.
@tony
tony force-pushed the lua-declaration-links branch from ff09f04 to ca01f63 Compare December 5, 2026 19:13
@tony
tony force-pushed the fix/lua-example-build-recipes branch 2 times, most recently from 81c4834 to 1f378a3 Compare December 6, 2026 08:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-preview Run CI without publishing a PR preview.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant