Skip to content

Compile the documentation's own code samples; tooling fixes and WIP reorganisation. - #195

Merged
KubaO merged 22 commits into
twinbasic:mainfrom
KubaO:staging
Sep 22, 2026
Merged

KubaO merged 22 commits into
twinbasic:mainfrom
KubaO:staging

Conversation

@KubaO

@KubaO KubaO commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Code samples

  • Added examples.bat, which builds the documentation's own twinBASIC code samples through the compiler and reports each diagnostic against the line in the page it came from.
  • A sample opts in by adding check_build to its fence; 818 are marked today and the run takes about 42 seconds.
  • The marker never reaches the reader — a marked fence renders to byte-identical HTML.
  • Added a hidden fence for the declarations a sample assumes, so that context can sit beside it in the source without being published; it renders to nothing, and so stays out of the search index, the offline copy and the PDF.
  • Completed the samples that were a declaration or two short of building, and declared the locals the VBA-derived pages left implicit.
  • Qualified every Assert call with its package namespace, matching the IDE's own package reference.
  • Closed an unterminated bold run in TestFixture's syntax line.

Tooling

  • tbbuild now detects a compiler crash from the Debug Console rather than the status bar; it used to report a clean build on a project that took the compiler down.
  • check_examples infers a sample's container from Me and from a top-level WithEvents field, and accepts slot, inherits, projname and hidden where the inference is wrong.
  • Template projects under test/example-projects/ supply the types each package's samples assume; cef and webview2 are separate so each has exactly one browser type.
  • wasm-graphviz 1.22.0 to 1.29.1.

Notes

  • The sample gate is deliberately outside build.bat, check.bat, test.bat and CI — it needs a twinBASIC install and Windows with a private desktop. It is run by a person, the same arrangement sweep_a11y.mjs has.
  • Split the engineering casebook out of WIP.md into five topic siblings, 199 KB down to 56 KB: WIP.md holds the rules, the siblings hold the reasoning.
  • Added BUGS-TO-REPORT.md, a queue for bugs in twinBASIC itself, including a two-line compiler crash the sample sweep found.

@KubaO
KubaO merged commit 7ef66bb into twinbasic:main Sep 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant