Repository navigation
docs: cover the direct wasm32 target, and let CI run on docs-only PRs - #539
Merged
Merged
Conversation
This was referenced Aug 18, 2026
godofecht
added a commit
that referenced
this pull request
Aug 18, 2026
The feature list is read out of the compiler rather than hand-maintained, so it cannot fall behind the implementation: keywords from Lexer.keyword_map, attributes from KNOWN_ATTRIBUTES, subcommands from the flow driver's dispatch table, modules from lib/stdlib, backends from the *_generator / *_codegen / *_compiler modules. That is 248 features today. docs/coverage.json maps each one to the page that documents it. A mapping only counts when the page exists and actually mentions the feature, so an entry cannot be a promise nobody kept, and a mapping for something the compiler has since dropped is reported as stale. Bootstrapping it found 16 features no page mentions at all. Twelve are compatibility aliases for `flow demo ...` and two are spelling aliases, all now exempt with reasons. One is the direct wasm32 backend, which PR #539 documents. The last was real: `flow check` has existed since #415 and was documented nowhere, so this adds it to DEVELOPMENT.md with what it reads from flow.toml, what it skips, and what it exits. Coverage now: attribute 20/20, backend 8/9, cli 52/66, keyword 44/44, stdlib 109/109, with 15 exemptions each carrying a written reason and nothing uncovered. Two extraction details worth knowing. Subcommands come from the dispatch `case` arms rather than show_help, so a command that exists but was never added to the help text still counts; the first attempt read every `case` in the driver and picked up architecture and profile arms, which the tests now pin against. And `mentions` is deliberately literal per category: `@gpu` matches the attribute while the bare word "gpu" does not, so a passing mention cannot masquerade as documentation. Reporting only, no CI gate yet. Unit 1428 passed, ruff clean. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
The MLIR to wasm32 path landed across #529 through #535 with no docs, and docs/language/wasm.md still listed "Direct WASM emission (skip C)" as deferred with no backend planned. - New "Direct wasm32 (no Emscripten)" section covering the pipeline, the `python -m flow.wasm_compiler` flags, export validation, linear-memory marshalling, the `env.malloc` import and the bump allocator in runtime/wasm/flow_runtime.mjs, the toolchain requirement, and what .github/workflows/wasm32.yml actually executes. - Replaced the stale deferred row. libc is the thing still missing under the freestanding target, so that is what the row now says. - Status matrix, "what works today" list, and the ROADMAP row name the second route. The ROADMAP cell also had an unescaped pipe splitting the table; escaped it. - DEVELOPMENT.md: the pipeline diagram stopped at "MLIR (experimental)" and never mentioned LLVM IR or wasm32. Added both plus a component entry for wasm_compiler.py. - docs/language/wasm.md and wasm-crossings.md were built but unreachable from the mkdocs nav. Added both. - Refreshed docs/library/stdlib-api.md, which build_wiki.py regenerates: six modules added since the last commit of it (bigint, checked_arith, dsp, keys, rf, units_si), 105 to 111. check_doc_links, check_wiki_links, build_wiki all pass; mkdocs warning count unchanged at 171. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The version and doc-links jobs carry a comment saying they are deliberately ungated at the job level, because the drift-prone files (README.md, CITATION.cff, flow.toml, docs/LANGUAGE_SPEC.md) sit outside every paths-filter. The workflow-level paths defeated that: no docs path was listed, so a docs-only PR never started the workflow and neither job ran. The docs PR this rides on got three checks, none of them the link checker. Added docs/**, mkdocs.yml, CITATION.cff and **.md to both triggers. Every expensive job stays gated on the changes filter, so a docs-only run is still just changes, version, doc-links and the aggregator. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
check_doc_coverage.py exempted backend:wasm_compiler with a reason naming this branch. The page exists here, so the exemption becomes a real mapping. Backends: 9/9 covered, nothing exempt. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
godofecht
force-pushed
the
docs/direct-wasm32-target
branch
from
August 18, 2026 10:10
80aaea0 to
ab46e0f
Compare
godofecht
added a commit
that referenced
this pull request
Aug 18, 2026
Two jobs, and a ratchet so the example one can be turned on today rather than after 359 fixes. doc-coverage runs check_doc_coverage.py and is deliberately ungated. A new keyword, attribute or subcommand added under src/ must not land undocumented just because the pull request touched no markdown, and the feature list is read from the compiler, so the job knows. doc-examples compiles every ```flow block. The examples that do not build today are recorded in docs/generated/example-status.json and grandfathered. Rows are keyed by a hash of the block's own text, so editing one produces a key the ledger has never seen and the new text has to compile. Existing debt is inherited; new and edited content is not. Debt that has since been paid off is reported, not failed. Failing an unrelated pull request because someone else fixed a doc example would teach people to regenerate the ledger without reading it, which is exactly how a ratchet stops meaning anything. Verified end to end rather than by inspection: a new broken block fails and names the file, line, stage and diagnostic; the same block tagged expect-error passes; and editing a block the ledger grandfathers makes it fail again. That last one is the property the whole scheme rests on, and it has its own test. Also fixed a bug in the failure path itself: the missing-ledger message called relative_to(ROOT), which raises when the ledger is anywhere else. Both jobs join the ci-ok aggregator. Ledger refreshed for the block #539 added: 751 examples, 359 unverified. Unit 1496 passed, ruff clean on src. 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.
The MLIR to wasm32 path landed across #529–#535 and touched no docs.
docs/language/wasm.mdstill listed it as deferred:Docs
New section: Direct wasm32 (no Emscripten). The page previously described one route to a
.wasm—./flow wasmthrough Emscripten. There are now two, for different jobs, so the intro says which is which and the new section documents the second: the pipeline, everypython -m flow.wasm_compilerflag, export validation against the symbols defined in the IR, reading and writing arguments through exported linear memory, theenv.mallocimport and the bump allocator inruntime/wasm/flow_runtime.mjs, and a table of what each CI step actually executes rather than just builds.Toolchain note. The clang on
PATHneeds the WebAssembly target compiled in. Apple's system clang does not have it and fails withNo available targets are compatible with triple "wasm32-unknown-unknown"— I hit this running the tool locally, so the section namesFLOW_WASM_CLANGandLLVM_PATHas the way out. It also explains the-Woverride-modulewarning: the MLIR step emitswasm32-unknown-emscriptenand the linker step overrides it.Stale rows corrected. The deferred row now names libc, which is what is genuinely still missing under a
-nostdlibtarget. The status matrix, the "what works today" list, and the ROADMAP row all name the second route. The ROADMAP cell also had an unescaped|inside it that split the table; escaped.DEVELOPMENT.md. The pipeline diagram stopped at
MLIR (experimental)and never mentioned LLVM IR or wasm32. Added both, plus a component entry forwasm_compiler.py.Nav.
docs/language/wasm.mdanddocs/language/wasm-crossings.mdwere being built but were unreachable from the mkdocs nav. Added both.Generated file refresh.
docs/library/stdlib-api.mdis regenerated byscripts/build_wiki.py; the checked-in copy was six modules behind (bigint,checked_arith,dsp,keys,rf,units_si), 105 → 111.The CI fix
The first push of this branch got three checks, and the link checker was not among them.
versionanddoc-linkscarry this comment:The workflow-level
on.*.pathsdefeated that intent. No docs path was listed, so a docs-only change never startedci.ymlat all, and the two jobs written specifically to catch markdown drift could never run on the PRs most likely to cause it.Added
docs/**,mkdocs.yml,CITATION.cffand**.mdto both triggers. Every expensive job stays gated on thechangesfilter and theci-okaggregator already treats unmatched jobs as not-required, so a docs-only run is still justchanges,version,doc-linksand the aggregator.Validation
scripts/check_doc_links.py— 1410 relative links across 1346 files, all resolvescripts/build_wiki.pythenscripts/check_wiki_links.py— both cleanmkdocs build— 171 warnings, identical to the count onmain, all pre-existingscripts/sync_version.py --check— in syncci.ymlparses as YAMLEverything documented here is read from the source and the workflow. I could not run the wasm build end to end locally, since the toolchain limitation above is the reason the toolchain section exists; the behaviour claims come from
src/flow/wasm_compiler.pyand the assertions in.github/workflows/wasm32.yml.Independent of #538, which is code.