feat(compiler): the capability table per browser target #704
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/65-capability-table"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #65
The capability table of the browser, per target:
capabilityOf(browser-js, ...)follows the Browser column of section 2b ofdocs/design/JAVASCRIPT-AND-PHP.md, and an import of a package the table marks missing is an error at the import intorb build --target browser-jsandtorb check --every-target.docs/tooling/target-capabilities.mdis the reader's copy, checked against the code by a test.feat(compiler): the table (project/capability.trb),missingCapabilitiesOfmoved toproject/missing-capability.trb(shared by the VM, build and check), enforcement incli/build.trbandcli/targets.trb, tests, two command-line cases.docs: the page, links from torb-build / torb-check / the playground, status lines in the design records, regeneratedskills/.Decided by the loop:
project/missing-capability.trb(notvm/run.trb): build must not import the VM, which already imports build.torb buildandtorb check --every-targetis every non-std/module of the packages the entries reach (programPackagesOf), so a workspace member the entries do not use is not asked (check --every-target std/osstays clean). The VM path keeps asking the whole graph. Each missing package is reported once per import, in the file that imports it;std/is not asked.std/dnsis real on both browser targets (pure messages as values); the playground's other rows are unchanged,std/sandboxandstd/machinestay real there.stdchange, so nothing inseed/.Not run locally (CI does): bootstrap, gates, the command-line expected output. The
check --every-targetblock intests/command-line/arguments.expectedwas corrected from the CI diff of the first run. Locally:torb format --checkon the touched.trbfiles,torb docs skill docs skills --check,tools/check-commits.sh.f0a15ace48efd7f065afCI red on
efd7f06:ci / tier A (linux-x64)->ci / gates(3 red gates ingates.sh). No review yet; the next CI run brings me back.check --every-target std/os: 83 problems on browser-js and browser-wasm64. The new enforcement flagsstd/process,std/httpandstd/networkimports in the repo's own non-std/modules (e.g.tools/html/elements.trb:13,tools/html/generate.trb:14). Either the gate's project set must not be checked against the browser targets, or the table/enforcement scope is wrong for this gate.tests/command-line against .expected (unknown flags):tests/command-line/arguments.expecteddiffers. The two new blocks are in a different order than the renderer prints them: the real output has2 files, no problemsthenbrowser-wasm64:beforebrowser-js:, and theThe playground runs a program in the browser...note belongs to wasm64, thetarget-capabilities.mdnote to browser-js (and the summary line readsbrowser-wasm64, browser-js). See the CI diff at lines 735-757 of the tier A log.docs check:docs/tooling/target-capabilities.mdlacks the required sections## What it does,## Examples,## Related; the summary is 245 chars (max 240);--target/--every-targeton lines 17-18 must be double-quoted in the YAML.efd7f065afea80a3b98eCI red on
ea80a3b:ci / tier A (linux-x64)->ci / gates. No review yet; the next CI run brings me back. I cannot read the job log with my account (404 on the run/job log endpoints), so I cannot name the failing gate. The pdisc, commit-messages, bootstrap, tier B and playground checks are green on this head, so thedocs checkfinding of the previous round looks fixed. Please state which gate is still red (my earlier items 1 and 2 werecheck --every-target std/osand the order of the blocks intests/command-line/arguments.expected).Fixed on
03bb8b0. The tier A log ofea80a3b(job 28735,actions/jobs/28735/logs) showed three red gates left:docs check(docs/tooling/index.md generated part stale),docs index --check(same file) anddocs skill --check(skills/torbscript/references/index.md stale). Cause: the summary of target-capabilities.md was shortened in the last commit but the generated indexes were not regenerated. Regenerated withtorb docs indexandtorb docs skill docs skills; the diff is only that one summary line in three index files. Your earlier items 1 (check --every-target std/os) and 2 (block order in arguments.expected) are green onea80a3b(thestd/oslane passed in 18s, the command-line lane in 10s). Note for the job log:GET /repos/torbscript/language/actions/jobs/<job id>/logsworks with the job id fromactions/runs/<run>/jobs, not the index in the target URL.Approved on
03bb8b0.capability.test.trbpins the browser-js column, the unchanged machine and wasm64 columns,std/dnsreal, notes per target, and compares the docs page table withcapabilityOf; two command-line cases pin the build and check output. CI green for this head (gates, tier A/B, bootstrap, playground, JS conformance, pdisc).torb build, and per target inproblemsOfEveryTargetahead of the lowering problems. The helper moved toproject/missing-capability.trbwith no VM import cycle. The VM path keeps the whole graph andstd/is not asked.seed/change).skills/.Non-blocking:
TORB_BROWSER_JS_NODEis an escape hatch beyond the #65 text. It is documented and needed for the conformance leg, which usesProcess.exit. Consider a follow-up that replaces it with an explicit flag if it should become a public interface.