Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 11 KB

WIP.Contributed.md

File metadata and controls

57 lines (48 loc) · 11 KB

Contributed packages --- what to do

The rules for documenting a contributed package from TWINSERV, its test project and its Experimental status, and what each package's section decided. The steps that move a section to a new version of its package are on the public page Updating a Contributed Package; how a test case is written is in test/package-tests/README.md; why the test design is what it is, in WIP.PackageTests.md.

Rules

  • A package's landing page opens, under its H1, with **Author:** (owner): the publisher TWINSERV lists (publisher in indexer/.packages/manifests/contributed.json), or the author the package's own sources name when that is someone else (VBA_JSON: Tim Hall, published by WaynePhillipsEA). Next to the author, on the same line, **Version:**: the version the section documents, which is its indexed_from and changes with it (owner). Then **On GitHub:** with a link, when a repository holds the package, or the library the package says it is made from; search GitHub for the package's name and the author's account, and check that the repository holds the package's code (its history too: TBMANLIB_* were never in woeoio's tbman). A landing page with one or two sections has no * TOC list. A class with member pages is a folder, <Class>/index.md at /tB/Packages/Contributed/<Package>/<Class>/ with its members beside it, so a member links to its class as (.); a class documented on one page is <Class>.md. Each package that is not Experimental is a chapter of the book's Packages part in _book.yml. A section's indexed_from is the four-part TWINSERV version, and its snapshot is under indexer/snapshots/contributed/. Every NOTE and WARNING of a section is backed by test cases in the package's test project, test/package-tests/<Package>/ (owner; its README), and names them in a <!-- test: ... --> marker on the line above it, which check_package_tests.mjs in test.bat enforces. A NOTE or WARNING is only for a real difference or limit (owner): a statement that describes how the package works stays prose, tied to its cases by a region, the marker on a line of its own above it and <!-- /test --> after it (owner). A difference from the object the package replaces that gives a different result silently (tbRegExp's \1(a), {,m}, $~ against VBScript) is a NOTE, not a WARNING (owner). A case checks what is correct, not what the package does (owner): a defect is a failing case, recorded in the project's expect.json, so the project tells the package's author what to fix. A structure that ends in a dynamic array where C has an inline one (Items() As T for T Items[1]) is WinDevLib's deliberate convention, not a defect (fafalone, 2026-11-17): the program copies the fixed part from a pointer to the raw block, ReDims the array by the structure's count or size field, then copies the entries into VarPtr(a(0)). Never report it to WinDevLib, or call it a defect on a page of a package that follows that convention; a page describes the convention instead. Whether one is a defect depends on the package's own convention: tbKMode's six were defects for tbKMode (fixed in 0.3.0.5 as (0 To 0), its upstream issue #2). Before drafting an issue about one, check which convention the package follows. A declaration that differs from the newest WDK or SDK but is right for the kit the package was written from is not a defect (owner, 2026-11-17): a package does not claim to follow the newest kit. Find that kit by what the package matches (tbKMode's modSysInfo: the 10.0.22621 SDK, whose POLICY_AUDIT_SUBCATEGORY_COUNT is 59 and which has no FileFsGuidInformation); a case then checks that kit's value, no callout reports the difference and no issue is drafted about it, and a page may say in prose which kit the value is from. A section whose project is not written yet is in that gate's PENDING set. A package that does not compile on the newest BETA gets no test project (owner: ArrayListLib, WinReg, Generics): it stays in PENDING until a version of it compiles, and a compile/ folder alone names the rows that refuse it, so its "does not compile" is checked. One that compiles for one architecture only is tested on that one (owner: TBMANLIB, win32; arches in its expect.json, test/package-tests/README.md), with a compile case for the other. A case that the IDE's own process would change goes in the package folder's exe/, which package_tests.mjs runs in a built exe (GdiPlus: the IDE has started GDI+; TBMANLIB: an HTTPS server of its own). package-tests.bat runs the cases; a case it reports fixed means the callout goes. The landing page ends, after See Also, with ## Test cases: one or two sentences linking to <Package>-tests.twinproj (owner), which the build publishes beside the section without the package's code in it (owner; one exception, owner: TBMANLIB_ConsoleComponents' project carries verbatim copies of seven of its component files, in Sources/ComponentSources/, because the package's own components cannot be given a console object, and its drawing can be checked only on the copies): it references the package as a linked package, which the reader puts in %APPDATA%\twinBASIC\packages (WIP.PackageTests.md). Its samples compile in the contributed-<Package> sample template, whose Settings names the package's version: change that version with indexed_from (WIP.ExamplesBuild.md). A contributed package is documented and its samples compiled against the newest twinBASIC BETA installed, never an older one (owner): the version that matters is the package's, and a statement about the compiler (such as "does not compile on BETA 1010") names that newest build. A contributed package that does not compile on that build, or has defects that a program would meet, is listed under Experimental Packages (owner); a minor defect that the section documents does not make it Experimental (owner: VBComDlg 1.0.13.0, whose Replace All raised no event, stayed Contributed; owner: nor does a fixed limit that the section states at the top of its landing page; owner: tsJson 1.0.15.0 stays Contributed, its defects confirmed by a second agent and each stated in a WARNING with a way round it; owner: xCalendar 1.0.17.0 is Contributed, its text colours working on BETA 1034, its grid and edge-press defects stated in a WARNING). A package moves from Contributed to Experimental for its defects only after a separate agent has reproduced each defect independently and ruled out misuse, a wrong expectation, a twinBASIC defect and the harness (owner). Before any package moves to Experimental, for its defects or because it does not compile, its section is updated to the newest version on TWINSERV (owner, 2026-11-09): node indexer/twin-index.mjs sync --upgrade --package <name> gives that version; a newer one is documented first (its pages, indexed_from, snapshot, sample template and test project), and the move goes ahead only if the newest version still has the defects or still does not compile. The move itself: docs/Reference/Experimental.md, at /tB/Packages/Experimental/, after Contributed Packages. Its landing page's parent: is Experimental Packages, its line is in Experimental.md and not in Contributed.md, and it has no chapter in the PDF book (owner: the book is for packages ready for use in a program): its entry is in left_out: of docs/_book.yml, in the list of Experimental packages, and the Experimental Packages page is left out with it. Its folder and URLs stay under Contributed/, so a package that is fixed moves back by changing only those three and the book (its entry leaves left_out: and its chapter is added among the others in alphabetical order, as tbKMode's after tbFileSysTools's, owner), and its pages keep their addresses. A link from a book page to a left-out one opens the website.

  • package-tests.bat --- runs the test projects of the contributed packages named (in any case: tbregexp), or of every one with --all-packages, which is never the default and leaves out GdiPlus, run only when named (owner; ALL_PACKAGES_SKIP in lib/package-tests.mjs, which np4 in the launcher repository reads too) (scripts/package_tests.mjs): each project under test/package-tests/ is staged with its package embedded and run with tbrun --tests as 32-bit and 64-bit, and each case is judged against expect.json as documented, fixed (the callout goes) or changed (a claim of the page is no longer true). --update writes expect.json from the run; read every entry it writes, since each is a claim that the package is defective. A case that never returns is caught and run alone. It also rewrites the generated RunAll.twin. Outside every gate and CI, as examples.bat is. The build publishes each project, referencing the package as a linked package and carrying none of its code, as tB/Packages/Contributed/<Package>/<Package>-tests.twinproj in the online tree (the packageTests task, builder/package-tests.mjs, _config.yml's package_tests; the publish allowlist exempts those paths, and the offline tree's links go to the website).

  • A package's own tools are run when its section is updated, never in a gate (owner, 2026-11-17): they live in its folder under test/package-tests/, each with a README, and are in no wrapper gate, not in CI and not on the developer Tools pages under docs/Documentation/. They are documented with the package: a tool published for readers has a page in the package's section, is linked from its landing page and has a card on the Downloads page, and its folder's publish.json makes the build zip it beside the section with everything it needs (test/package-tests/README.md, Tools of one package; tbKMode's verifier).

Per package

BigNumberLib's section documents its main class only. What a package's section decided, and what is known about the package beyond its pages, is in a file of its own:

A package with nothing to note has no file; one is started the first time there is.