Repository navigation
docs: retire the core library page, which documented an API that does not exist - #545
Merged
Merged
Conversation
… not exist docs/library/core.md listed 78 functions. 75 of them exist nowhere in lib/, src/, runtime/, compiler/ or examples/. gpu_init, gpu_launch_kernel, metal_is_available, metal_execute_shader and the rest were never built. The page read as authoritative, opening "The FLOW core library provides fundamental types, operations, and runtime functions for the language" and "FLOW includes a comprehensive GPU runtime system with support for multiple backends". It sat in the sidebar under Standard library, so a reader looking for the core API found it first. It dates from an early Metal-GPU commit and was never reconciled with what shipped. It was also written in a syntax the language does not have: `[i32]` and `[any]` for arrays where Flow uses `array<T>`, and `str` where Flow uses `string`. That is why 15 of its examples could not compile. Two pages already do this job properly. library/stdlib-api.md is generated from lib/stdlib on every wiki build and covers 111 real modules; library/stdlib-reference.md is the hand-written guide. Rewriting core.md against the real stdlib would have duplicated both. References removed along with it: the sidebar entry, the docs/README.md link, a "Related stdlib" link in library/tiny-pointers.md, and a comment in lib/stdlib/gpu_memory.flow that pointed readers at the page for naming. The two features coverage.json mapped to it move to LANGUAGE_SPEC.md. Examples: 774 blocks to 750, unverified 375 to 359. Unit 1491 passed, tier-2 677/677, nav, links, anchors and coverage all clean. 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.
Found by the coverage and example checkers from #540 and #543, then confirmed by hand.
The finding
docs/library/core.mddocuments 78 functions. 75 of them exist nowhere inlib/,src/,runtime/,compiler/orexamples/:gpu_init,gpu_launch_kernel,gpu_synchronize,metal_is_available,metal_execute_shader,get_platform,get_last_errorand seventy others were never built.The page does not read as speculative. It opens:
And it sat in the sidebar under Standard library, so a reader looking for the core API met it first. It dates from an early Metal-GPU commit and was never reconciled with what shipped.
It is also written in a syntax Flow does not have:
[i32]and[any]for arrays where the language usesarray<T>, andstrwhere the language usesstring. That is why 15 of its 24 examples could not compile, making it the second-largest cluster of broken examples in the repository.I checked whether this was systemic. It is not: every other page under
docs/library/is prose with few or no signatures, and none of them show this pattern.Why delete rather than rewrite
Two pages already do the job properly:
library/stdlib-api.mdis generated fromlib/stdlibon every wiki build and covers 111 real moduleslibrary/stdlib-reference.mdis the hand-written guideRewriting
core.mdagainst the real stdlib would have duplicated both, and the page's structure is organised around subsystems that do not exist.What went with it
docs/nav.jsonsidebar entry "Core"docs/README.mdlinkdocs/library/tiny-pointers.md"Related stdlib" linkstdlib-api.mdlib/stdlib/gpu_memory.flowcomment naming the pagedocs/coverage.json:keyword:enum,keyword:functionLANGUAGE_SPEC.mdEffect
Examples go from 774 blocks to 750; unverified from 375 to 359.
Validation
./flow test --tier2 --strict677/677, covering thelib/stdlibeditwiki_nav.pyconsistent,check_doc_links.pyclean including all 122 fragments,check_doc_coverage.pyreports every feature still has a homecheck_wiki_links.pyclean