Repository navigation
Let a documentation block build on an earlier one on the same page (#584) - #601
Merged
Merged
Conversation
) A chapter builds a program up in pieces: the struct is shown once, then the functions over it. Every one of those later blocks failed, because each fence is compiled alone. docs/book/06-pipelines-and-results.md could not verify parse_port without repeating struct ResultI32 above it, which is worse prose than the page has now. ```flow id=result-type struct ResultI32 { ok: bool, value: i32 } ``` ```flow uses=result-type id=parse-port function parse_port(raw: i32) -> ResultI32 { ... } ``` ```flow uses=result-type,parse-port function configure(raw: i32) -> ResultI32 { ... } ``` Named rather than implicit, because silently concatenating whatever came before would verify a program the page never shows. Ids are page-scoped and resolve backwards only, so the context a block compiles against is exactly what it names, and a `uses=` pointing at a block that was renamed or moved fails the build instead of quietly verifying something else. preamble= already existed and stays: it carries context that is not on the page at all. This is for context the page does show. Closes #584 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Closes #584.
The problem
A chapter builds a program up in pieces. Every fence is compiled alone, so every later block failed:
The fix cannot be to repeat
struct ResultI32above every fence. That is worse prose than the page has now, and the issue says so.The mechanism
uses='gone' names no earlier block on this page; add id=gone to the block it depends on